Skip to content

Commit 2298aa6

Browse files
chore(Grid): update onread examples due to a latest changes
1 parent 52466c3 commit 2298aa6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

components/grid/manual-operations.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ This sample shows how to set up the grid to use grouping with manual data source
232232
@code {
233233
public List<Employee> SourceData { get; set; }
234234
235-
// Handling grouping happens here - by casting the DataSourceResult.Data to objects
236235
protected async Task ReadItems(GridReadEventArgs args)
237236
{
238237
// in this example, we use the Telerik extension methods to shape the data
@@ -243,7 +242,7 @@ This sample shows how to set up the grid to use grouping with manual data source
243242
// to work with grouping, the grid data needs to be an IEnumerable<object>
244243
// because grouped data has a different shape than non-grouped data
245244
// and this is, generally, hidden from you by the grid, but now it cannot be
246-
args.Data = datasourceResult.Data.Cast<object>().ToList();
245+
args.Data = datasourceResult.Data;
247246
248247
args.Total = datasourceResult.Total;
249248
args.AggregateResults = datasourceResult.AggregateResults;

knowledge-base/grid-custom-grouping-order.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ To achieve custom grouping order in the Telerik Grid for Blazor, follow these st
9595
List<string> customOrder = new List<string> { "Text D", "Text A", "Text C", "Text B" };
9696
groups = groups.OrderBy(group => customOrder.IndexOf(group.Key.ToString())).ToList();
9797
98-
args.Data = groups.Cast<object>().ToList();
98+
args.Data = groups;
9999
}
100100
else
101101
{
@@ -104,7 +104,7 @@ To achieve custom grouping order in the Telerik Grid for Blazor, follow these st
104104
.OrderBy(Text => GetCustomOrderIndex(Text.S1))
105105
.ToList();
106106
107-
args.Data = orderedData.Cast<object>().ToList();
107+
args.Data = orderedData;
108108
}
109109
110110
args.Total = datasourceResult.Total;

0 commit comments

Comments
 (0)