Skip to content

Commit 8a941f1

Browse files
chore(common): fix broken blocks of code
1 parent 41d78d3 commit 8a941f1

25 files changed

+193
-193
lines changed

_contentTemplates/grid/export.md

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,70 +11,70 @@
1111

1212
* With Server-side Blazor, the file may become larger than the default SignalR connection limit, and this can disconnect the client and result in an error. Generally, this requires quite a lot of data to happen, but you may need to increase the size limit of the connection in the `ConfigureServices` method of your `Startup.cs` file, for example:
1313

14-
**C#**
15-
16-
services.AddServerSideBlazor().AddHubOptions(o =>
17-
{
18-
o.MaximumReceiveMessageSize = 1024 * 1024; // 1MB
19-
});
14+
````C#
15+
services.AddServerSideBlazor().AddHubOptions(o =>
16+
{
17+
o.MaximumReceiveMessageSize = 1024 * 1024; // 1MB
18+
});
19+
````
2020

2121
* With Client-side Blazor (WebAssembly), all the code runs in the browser and, at the time of writing, is considerably slower than server-side Blazor, and it only has one actual thread. This means that while the file is being generated, the UI will be unresponsive, so you may want to show a loading sign to the user through the `OnClick` handler of the command button, something like:
2222

23-
**Component**
24-
25-
@* Exporting a lot of rows can be slow in a WebAssembly app more so than in a server-side app, and it blocks the UI *@
23+
````RAZOR Component
24+
@* Exporting a lot of rows can be slow in a WebAssembly app more so than in a server-side app, and it blocks the UI *@
2625
27-
<TelerikGrid Data="@GridData" AutoGenerateColumns="true" Pageable="true">
28-
<GridToolBarTemplate>
29-
<GridCommandButton OnClick="@ShowLoadingSign" Command="ExcelExport" Icon="@SvgIcon.FileExcel">Export to Excel</GridCommandButton>
30-
<GridCommandButton OnClick="@ShowLoadingSign" Command="CsvExport" Icon="@SvgIcon.FileCsv">Export to CSV</GridCommandButton>
31-
</GridToolBarTemplate>
32-
<GridExport>
33-
<GridExcelExport AllPages="true" FileName="telerik-grid-export" />
34-
<GridCsvExport AllPages="true" FileName="telerik-grid-export" />
35-
</GridExport>
36-
</TelerikGrid>
26+
<TelerikGrid Data="@GridData" AutoGenerateColumns="true" Pageable="true">
27+
<GridToolBarTemplate>
28+
<GridCommandButton OnClick="@ShowLoadingSign" Command="ExcelExport" Icon="@SvgIcon.FileExcel">Export to Excel</GridCommandButton>
29+
<GridCommandButton OnClick="@ShowLoadingSign" Command="CsvExport" Icon="@SvgIcon.FileCsv">Export to CSV</GridCommandButton>
30+
</GridToolBarTemplate>
31+
<GridExport>
32+
<GridExcelExport AllPages="true" FileName="telerik-grid-export" />
33+
<GridCsvExport AllPages="true" FileName="telerik-grid-export" />
34+
</GridExport>
35+
</TelerikGrid>
3736
38-
<TelerikWindow Visible="@isExporting" Modal="true">
39-
<WindowTitle>Please wait...</WindowTitle>
40-
<WindowContent>We are exporting your data, your file will download shortly.</WindowContent>
41-
</TelerikWindow>
37+
<TelerikWindow Visible="@isExporting" Modal="true">
38+
<WindowTitle>Please wait...</WindowTitle>
39+
<WindowContent>We are exporting your data, your file will download shortly.</WindowContent>
40+
</TelerikWindow>
4241
43-
@code {
44-
bool isExporting { get; set; }
42+
@code {
43+
bool isExporting { get; set; }
4544
46-
async Task ShowLoadingSign()
47-
{
48-
isExporting = true;
49-
StateHasChanged();
50-
// This won't work for server-side Blazor, the UI will render immediately after the delay and the loading sign will only flicker
51-
await Task.Delay(50);
52-
isExporting = false;
53-
}
45+
async Task ShowLoadingSign()
46+
{
47+
isExporting = true;
48+
StateHasChanged();
49+
// This won't work for server-side Blazor, the UI will render immediately after the delay and the loading sign will only flicker
50+
await Task.Delay(50);
51+
isExporting = false;
52+
}
5453
55-
List<SampleData> GridData { get; set; }
54+
List<SampleData> GridData { get; set; }
5655
57-
protected override void OnInitialized()
58-
{
59-
GridData = Enumerable.Range(1, 1000).Select(x => new SampleData
60-
{
61-
ProductId = x,
62-
ProductName = $"Product {x}",
63-
UnitsInStock = x * 2,
64-
Price = 3.14159m * x,
65-
Discontinued = x % 4 == 0,
66-
FirstReleaseDate = DateTime.Now.AddDays(-x)
67-
}).ToList();
68-
}
56+
protected override void OnInitialized()
57+
{
58+
GridData = Enumerable.Range(1, 1000).Select(x => new SampleData
59+
{
60+
ProductId = x,
61+
ProductName = $"Product {x}",
62+
UnitsInStock = x * 2,
63+
Price = 3.14159m * x,
64+
Discontinued = x % 4 == 0,
65+
FirstReleaseDate = DateTime.Now.AddDays(-x)
66+
}).ToList();
67+
}
6968
70-
public class SampleData
71-
{
72-
public int ProductId { get; set; }
73-
public string ProductName { get; set; }
74-
public int UnitsInStock { get; set; }
75-
public decimal Price { get; set; }
76-
public bool Discontinued { get; set; }
77-
public DateTime FirstReleaseDate { get; set; }
78-
}
79-
}
69+
public class SampleData
70+
{
71+
public int ProductId { get; set; }
72+
public string ProductName { get; set; }
73+
public int UnitsInStock { get; set; }
74+
public decimal Price { get; set; }
75+
public bool Discontinued { get; set; }
76+
public DateTime FirstReleaseDate { get; set; }
77+
}
78+
}
79+
````
8080
#end

common-features/cdn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Here are a few examples:
4141
4242
<div class="skip-repl"></div>
4343

44-
````CHTML
44+
````RAZOR
4545
<!-- Ocean Blue swatch of the Default theme -->
4646
<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-default@{{site.themesVersion}}/dist/default-ocean-blue.css" />
4747
@@ -68,7 +68,7 @@ Here are a few examples:
6868
6969
<div class="skip-repl"></div>
7070

71-
````CHTML
71+
````RAZOR
7272
<!-- Ocean Blue swatch of the Default theme -->
7373
<link rel="stylesheet" href="https://blazor.cdn.telerik.com/blazor/{{site.uiForBlazorLatestVersion}}/kendo-theme-default/swatches/default-ocean-blue.css" />
7474
@@ -90,7 +90,7 @@ The CDN hosts the [JavaScript (JSInterop) file of Telerik UI for Blazor]({%slug
9090
9191
<div class="skip-repl"></div>
9292

93-
````CHTML
93+
````RAZOR
9494
<script src="https://blazor.cdn.telerik.com/blazor/{{site.uiForBlazorLatestVersion}}/telerik-blazor.min.js"></script>
9595
````
9696

components/dropdownlist/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Blazor DropDownList component allows the user to choose an option from a pre
2222

2323
>caption DropDownList [data binding](data-bind), two-way value binding, and main features
2424
25-
````CSHTML
25+
````RAZOR
2626
Selected value: @selectedValue
2727
<br />
2828
@@ -115,7 +115,7 @@ The following parameters enable you to customize the [appearance]({%slug dropdow
115115

116116
The DropDownList exposes settings for its dropdown (popup). To configure the options, declare a `<DropDownListPopupSettings>` tag inside a `<DropDownListSettings>` tag:
117117

118-
````CHTML
118+
````RAZOR
119119
<TelerikDropDownList Data="@DropDownData"
120120
@bind-Value="@SelectedItem"
121121
Filterable="true"
@@ -148,7 +148,7 @@ Add a reference to the component instance to use the [DropDownList's methods](/b
148148

149149
@[template](/_contentTemplates/dropdowns/methods.md#methods-list)
150150

151-
````CSHTML
151+
````RAZOR
152152
<TelerikDropDownList @ref="@DropDownListRef"
153153
Data="@DropDownListData"
154154
@bind-Value="@DropDownListValue"
@@ -187,7 +187,7 @@ By default, if no `Value` is provided and no `DefaultText` is defined, the DropD
187187

188188
>caption Default text (hint) to show when no actual item is selected
189189
190-
````CSHTML
190+
````RAZOR
191191
@MyStringItem
192192
<TelerikDropDownList Data="@MyStringList" @bind-Value="@MyStringItem" DefaultText="Select something">
193193
</TelerikDropDownList>
@@ -215,7 +215,7 @@ By default, if no `Value` is provided and no `DefaultText` is defined, the DropD
215215

216216
>caption Get selected item from external code
217217
218-
````CSHTML
218+
````RAZOR
219219
@result
220220
<br />
221221

components/gantt/state.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ If you want the Gantt to start with certain settings for your end users, you can
122122

123123
>caption Choose a default state of the Gantt for your users
124124
125-
````CSHTML
125+
````RAZOR
126126
@*Set initial Gantt state*@
127127
128128
@using Telerik.DataSource
@@ -293,7 +293,7 @@ The following example shows one way you can store the Gantt state - through a cu
293293
>caption Save, Load, Reset Gantt state on every state change. Uses a sample LocalStorage in the browser.
294294
295295
<div class="skip-repl"></div>
296-
````Component
296+
````RAZOR Component
297297
@inject LocalStorage LocalStorage
298298
@inject IJSRuntime JsInterop
299299
@@ -490,7 +490,7 @@ Change something in the Gantt (like sort, filter, resize TreeList width, expand/
490490
}
491491
}
492492
````
493-
````Service
493+
````C# Service
494494
using Microsoft.JSInterop;
495495
using System.Text.Json;
496496
public class LocalStorage
@@ -542,16 +542,16 @@ The Gantt state allows you to control the behavior of the Gantt programmatically
542542
>tip If you want to set an initial state to the Gantt, use a similar snippet, but in the `OnStateInit` event.
543543
544544
<div class="skip-repl"></div>
545-
````Sorting
545+
````RAZOR Sorting
546546
@[template](/_contentTemplates/gantt/state.md#set-sort-from-code)
547547
````
548-
````FilterRow
548+
````RAZOR FilterRow
549549
@[template](/_contentTemplates/gantt/state.md#filter-row-from-code)
550550
````
551-
````FilterMenu
551+
````RAZOR FilterMenu
552552
@[template](/_contentTemplates/gantt/state.md#filter-menu-from-code)
553553
````
554-
````Hierarchy
554+
````RAZOR Hierarchy
555555
@[template](/_contentTemplates/gantt/state.md#expand-hierarchy-from-code)
556556
````
557557

@@ -567,7 +567,7 @@ Find out how to [get the applied filtering and sorting criteria]({%slug common-f
567567

568568
>caption Know when the Gantt state changes, which parameter changes, and amend the change
569569
570-
````CSHTML
570+
````RAZOR
571571
@*This example does the following:
572572
* Logs to the console what changed in the Gantt
573573
* If the user changes the Title column filtering, the filter is always overriden to "Contains" and its value to "Task 1"
@@ -742,7 +742,7 @@ In addition to that, you can also use the `EditItem`, `OriginalEditItem`, `Inser
742742

743743
>caption Start Gantt Editing or Insertion Programmatically
744744
745-
````CSHTML
745+
````RAZOR
746746
@*Initiate editing and inserting of items through the Gantt state*@
747747
748748
<TelerikButton OnClick="@StartInsert">Insert at Root Level</TelerikButton>
@@ -1030,7 +1030,7 @@ By looping over the `ColumnStates` collection you can know what the user sees. B
10301030

10311031
>caption Obtain the current columns visibility, rendering order, field name and width
10321032
1033-
````CSHTML
1033+
````RAZOR
10341034
@*Get Gantt column state from code*@
10351035
10361036
<TelerikButton OnClick="@GetCurrentColumnsState">Get Column State</TelerikButton>

components/grid/export/csv.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When you click the Export button, your browser will receive the resulting file.
2626

2727
To enable the grid CSV Export, add a [command button]({%slug components/grid/columns/command%}) with the `CsvExport` command name to the [Grid toolbar]({%slug components/grid/features/toolbar%}).
2828

29-
````
29+
````RAZOR
3030
<GridToolBarTemplate>
3131
<GridCommandButton Command="CsvExport" Icon="@SvgIcon.FileCsv">Export to CSV</GridCommandButton>
3232
</GridToolBarTemplate>
@@ -40,7 +40,7 @@ Optionally, you can also set the `GridCsvExport` tag settings under the `GridExp
4040

4141
>caption Export the Grid to CSV - Example
4242
43-
````CSHTML
43+
````RAZOR
4444
@* You can sort, group, filter, page the grid, reorder its columns, and you can click the
4545
Export button to save the current data *@
4646
@@ -106,7 +106,7 @@ You can programmatically invoke the export feature of the Grid, by using the fol
106106
107107
>caption Invoke the export function from code
108108
109-
````CSHTML
109+
````RAZOR
110110
@* Send the exported file for download and get the exported data as a memory stream *@
111111
112112
@using System.IO

components/grid/export/excel.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When you click the Export button, your browser will receive the resulting file.
2626

2727
To enable the Grid Excel Export, add a [command button]({%slug components/grid/columns/command%}) with the `ExcelExport` command name to the [Grid toolbar]({%slug components/grid/features/toolbar%}).
2828

29-
````
29+
````RAZOR
3030
<GridToolBarTemplate>
3131
<GridCommandButton Command="ExcelExport" Icon="@SvgIcon.FileExcel">Export to Excel</GridCommandButton>
3232
</GridToolBarTemplate>
@@ -40,7 +40,7 @@ Optionally, you can also set the `GridExcelExport` tag settings under the `GridE
4040

4141
>caption Export the Grid to Excel - Example
4242
43-
````CSHTML
43+
````RAZOR
4444
@* You can sort, group, filter, page the grid, resize and reodrder its columns, and you can click the
4545
Export button to save the current data *@
4646
@@ -106,7 +106,7 @@ You can programmatically invoke the export feature of the Grid, by using the fol
106106
107107
>caption Invoke the export function from code
108108
109-
````CSHTML
109+
````RAZOR
110110
@* Send the exported file for download and get the exported data as a memory stream *@
111111
112112
@using System.IO

components/grid/state.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The example below shows how to apply initial sorting, filtering and grouping.
7272

7373
>caption Using Grid OnStateInit
7474
75-
````CSHTML
75+
````RAZOR
7676
@using Telerik.DataSource
7777
7878
<TelerikGrid Data="@GridData"
@@ -180,7 +180,7 @@ Find out how to [get the applied filtering, sorting and grouping criteria]({%slu
180180

181181
>caption Using Grid OnStateChanged
182182
183-
````CSHTML
183+
````RAZOR
184184
@using System.Text.Json
185185
186186
<div id="demo-container">
@@ -390,25 +390,25 @@ The tabs below show how to set the Grid state and control filtering, sorting and
390390
@[template](/_contentTemplates/grid/state.md#initial-state)
391391

392392
<div class="skip-repl"></div>
393-
````Sorting
393+
````RAZOR Sorting
394394
@[template](/_contentTemplates/grid/state.md#set-sort-from-code)
395395
````
396-
````FilterRow
396+
````RAZOR FilterRow
397397
@[template](/_contentTemplates/grid/state.md#filter-row-from-code)
398398
````
399-
````FilterMenu
399+
````RAZOR FilterMenu
400400
@[template](/_contentTemplates/grid/state.md#filter-menu-from-code)
401401
````
402-
````Search
402+
````RAZOR Search
403403
@[template](/_contentTemplates/grid/state.md#search-from-code)
404404
````
405-
````Grouping
405+
````RAZOR Grouping
406406
@[template](/_contentTemplates/grid/state.md#group-from-code)
407407
````
408-
````Hierarchy
408+
````RAZOR Hierarchy
409409
@[template](/_contentTemplates/grid/state.md#expand-hierarchy-from-code)
410410
````
411-
````Columns
411+
````RAZOR Columns
412412
@[template](/_contentTemplates/grid/state.md#column-state-from-code)
413413
````
414414

components/splitter/state.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Each `SplitterPaneState` object has the following information:
2424
>caption How to save and load the state to/from JSON and the browser local storage, and how to manually change the state of the splitter on a button click
2525
2626
<div class="skip-repl"></div>
27-
````Component
27+
````RAZOR Component
2828
@inject LocalStorage LocalStorage
2929
@inject IJSRuntime JsRuntine
3030
@@ -96,7 +96,7 @@ Each `SplitterPaneState` object has the following information:
9696
}
9797
9898
````
99-
````Service
99+
````C# Service
100100
public class LocalStorage
101101
{
102102
protected IJSRuntime JSRuntimeInstance { get; set; }

0 commit comments

Comments
 (0)