Skip to content

Commit 8c01a44

Browse files
committed
chore(common): skip repls and fix samples
1 parent b2a199f commit 8c01a44

10 files changed

+26
-5
lines changed

knowledge-base/grid-csv-export-change-field-delimiter.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ To change the field delimiter, do the following:
4848

4949
1. Pass that `MemoryStream` to the `args.Stream` of the `GridAfterCsvExportEventArgs`, so that the modifications can be saved to the actual exported file.
5050

51+
<div class="skip-repl"></div>
5152
````RAZOR
5253
@*Customize the field delimiter of the exported CSV file*@
5354

knowledge-base/grid-one-expanded-detail-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You can use the [grid state]({%slug grid-state%}) to make sure only one item is
6868
state.ExpandedItems = new List<MainModel> { currItem };
6969
// Note: SetState() will call OnRead, so you may want to
7070
// consider raising flags and caching data if you want to reduce requests for remote data
71-
await Grid.SetState(state);
71+
await Grid.SetStateAsync(state);
7272
}
7373
7474
async Task OnRowClickHandler(GridRowClickEventArgs args)

knowledge-base/grid-static-group.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Examples of both follow below, see the code comments for details.
143143
144144
The key thing is to set `Visible=false`, the other settings are to ensure it cannot be shown, resized, edited, moved or otherwise interacted with. Hiding it from the column chooser will also prevent the user from showing it on their own, the other settings are to showcase you can disable them, and to limit the options in case your other state modifications require that you show it at some point. You can tweak this as necessary.
145145

146+
<div class="skip-repl"></div>
146147
````RAZOR
147148
<GridColumn Field="@(nameof(SampleData.Team))" Title="Team" Width="0px" VisibleInColumnChooser="false" Visible="false"
148149
Reorderable="false" Resizable="false" Filterable="false" Sortable="false" Groupable="false" Editable="false" Lockable="false">
@@ -151,6 +152,7 @@ The key thing is to set `Visible=false`, the other settings are to ensure it can
151152

152153
>caption Sample CSS rules to hide the group header and/or the [x] buttons on group indicators
153154
155+
<div class="skip-repl"></div>
154156
````RAZOR
155157
<style>
156158
/* if you add the no-group-header Class to the grid, the following rule

knowledge-base/grid-virtualization-many-records.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ The issue with the content overflow is the same - when the element size limit is
9292

9393
>caption Add this code just after the grid closing tag to color the element borders like in the image above to see the issue
9494
95+
<div class="skip-repl"></div>
9596
````RAZOR
9697
</TelerikGrid>
9798

knowledge-base/inputs-open-programmatically.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ Review the `attachFocusHandler` JavaScript function below. It is called in `OnAf
5656

5757
Note that the Date/Time Pickers move focus to their popup once it is opened. This enables keyboard navigation in the popup, but prevents immediate move to another component via tabbing. You need to hit Enter to close the popup and return focus to the DateInput textbox. Then tab.
5858

59+
> Replace the `OnFocusKB` type of the `DotNetObjectReference` in the example below with the type of the component that hosts this code.
60+
5961
>caption Focus Component and Open Dropdown Programmatically
6062
63+
<div class="skip-repl"></div>
6164
````RAZOR
6265
@inject IJSRuntime js
6366
@* Open dropdown on click or focus *@
@@ -152,6 +155,7 @@ TimePicker:
152155
Width="300px" />
153156
154157
@code {
158+
//Replace the OnFocusKB type with the type of the component that hosts this code
155159
private DotNetObjectReference<OnFocusKB>? DotNetRef { get; set; }
156160
157161
private List<Product> ValueCollection { get; set; } = new();
@@ -213,10 +217,10 @@ TimePicker:
213217
for (int i = 1; i <= 10; i++)
214218
{
215219
ValueCollection.Add(new Product()
216-
{
217-
ID = i,
218-
Name = "Product Name " + i.ToString()
219-
});
220+
{
221+
ID = i,
222+
Name = "Product Name " + i.ToString()
223+
});
220224
}
221225
222226
DotNetRef = DotNetObjectReference.Create(this);
@@ -236,6 +240,7 @@ TimePicker:
236240

237241
[UI for Blazor versions 2.25 - 2.30 have different HTML rendering for the input components]({%slug changes-in-3-0-0%}). Use this `attachFocusHandler` code instead:
238242

243+
<div class="skip-repl"></div>
239244
````JS
240245
function attachFocusHandler(id, componentClass) {
241246
var element = document.getElementById(id);

knowledge-base/menu-authorize-view.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ For example, a `.Where()` filter can be used to return only items based on certa
3535

3636
>caption Pseudocode example of showing menu items according to user authorization level
3737
38+
<div class="skip-repl"></div>
3839
````RAZOR
3940
<AuthorizeView>
4041
<h1>Hello, @context.User.Identity.Name!</h1>

knowledge-base/pdfviewer-sign-pdfs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The PdfViewer does not currently have the capability to manage digital signature
3434

3535
## Example
3636

37+
<div class="skip-repl"></div>
3738
```csharp
3839
<TelerikPdfViewer Data="@PdfSource">
3940
<PdfViewerToolBar>

knowledge-base/treelist-enable-checkbox-selection-only-edit-mode.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ Below is an example implementation that toggles the visibility of the Checkbox C
343343

344344
Alternatively, if you prefer not to toggle the `CheckboxColumn` visibility but just disable it, you can apply conditional custom CSS based on the flag that you set in the `OnEdit`/`OnAdd` handlers.
345345

346+
<div class="skip-repl"></div>
346347
````RAZOR
347348
@if (!SelectionEnabled)
348349
{

knowledge-base/typescript-exports-error.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ To reproduce the basic error, just add a TypeScript file, `export` a function fr
3535

3636
>caption Sample TypeScript file - `wwwroot/js/MyScript.ts`
3737
38+
<div class="skip-repl"></div>
3839
````TypeScript
3940
export function test() {
4041
alert("test");
@@ -43,6 +44,7 @@ export function test() {
4344

4445
>caption Referencing the resulting JS file in the index file
4546
47+
<div class="skip-repl"></div>
4648
````RAZOR
4749
. . .
4850
<script src="js/MyScript.js"></script>
@@ -54,6 +56,7 @@ export function test() {
5456

5557
>caption Resulting output in the JS file (generated through the `Microsoft.TypeScript.MSBuild` package Visual Studio offers to install for you to build TS, other compilers often have similar default output)
5658
59+
<div class="skip-repl"></div>
5760
````MyScript.js
5861
"use strict";
5962
Object.defineProperty(exports, "__esModule", { value: true });
@@ -75,6 +78,7 @@ Then, if you add a workaround that is commonly offered on the Internet for that,
7578

7679
>caption Commonly shared workaround for the error above
7780
81+
<div class="skip-repl"></div>
7882
````JavaScript
7983
<script>
8084
var exports = {}; // defining an empty exports object is that common workaround
@@ -105,6 +109,7 @@ To get scripts running from TypeScript files, you may want to look into using to
105109

106110
>caption Sample `tsconfig.json` to disable generation of exports so you don't get the first error
107111
112+
<div class="skip-repl"></div>
108113
````JSON
109114
{
110115
"compilerOptions": {
@@ -115,6 +120,7 @@ To get scripts running from TypeScript files, you may want to look into using to
115120

116121
>caption Updated `MyScript.ts` file without exports
117122
123+
<div class="skip-repl"></div>
118124
````TypeScript
119125
function test() {
120126
alert("test");
@@ -123,6 +129,7 @@ function test() {
123129

124130
>caption Result from the compiled TypeScript
125131
132+
<div class="skip-repl"></div>
126133
````JavaScript
127134
function test() {
128135
alert("test");

knowledge-base/upload-preview-image.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ namespace TelerikBlazorUpload.Controllers
218218
>caption Preview selected images when using the FileSelect component
219219
220220
````RAZOR
221+
@using System.IO;
222+
221223
<h2>FileSelect</h2>
222224
223225
<TelerikFileSelect Accept="@string.Join(",", ImageFileExtensions)"

0 commit comments

Comments
 (0)