Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge grid-update-onread-examples-2558 into production #2559

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/grid/grouping/load-on-demand.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ Scroll through the groups or expand them to load their data on demand

if (args.Request.Groups.Count > 0)
{
args.Data = result.GroupedData.Cast<object>().ToList();
args.Data = result.GroupedData;
}
else
{
args.Data = result.CurrentPageData.Cast<object>().ToList();
args.Data = result.CurrentPageData;
}

args.Total = result.TotalItemCount;
Expand Down
3 changes: 1 addition & 2 deletions components/grid/manual-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ This sample shows how to set up the grid to use grouping with manual data source
@code {
public List<Employee> SourceData { get; set; }

// Handling grouping happens here - by casting the DataSourceResult.Data to objects
protected async Task ReadItems(GridReadEventArgs args)
{
// in this example, we use the Telerik extension methods to shape the data
Expand All @@ -243,7 +242,7 @@ This sample shows how to set up the grid to use grouping with manual data source
// to work with grouping, the grid data needs to be an IEnumerable<object>
// because grouped data has a different shape than non-grouped data
// and this is, generally, hidden from you by the grid, but now it cannot be
args.Data = datasourceResult.Data.Cast<object>().ToList();
args.Data = datasourceResult.Data;

args.Total = datasourceResult.Total;
args.AggregateResults = datasourceResult.AggregateResults;
Expand Down
4 changes: 2 additions & 2 deletions knowledge-base/grid-custom-grouping-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ To achieve custom grouping order in the Telerik Grid for Blazor, follow these st
List<string> customOrder = new List<string> { "Text D", "Text A", "Text C", "Text B" };
groups = groups.OrderBy(group => customOrder.IndexOf(group.Key.ToString())).ToList();

args.Data = groups.Cast<object>().ToList();
args.Data = groups;
}
else
{
Expand All @@ -104,7 +104,7 @@ To achieve custom grouping order in the Telerik Grid for Blazor, follow these st
.OrderBy(Text => GetCustomOrderIndex(Text.S1))
.ToList();

args.Data = orderedData.Cast<object>().ToList();
args.Data = orderedData;
}

args.Total = datasourceResult.Total;
Expand Down
1 change: 1 addition & 0 deletions upgrade/breaking-changes/7-0-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The obsolete `ClearButton` parameter is removed. Use `ShowClearButton` instead.
* The obsolete `AutoFitColumn()` method is removed. [Use `AutoFitColumnAsync()`]({%slug components/grid/columns/resize%}#autofit-columns) instead.
* The obsolete `AutoFitColumns()` method is removed. Use `AutoFitColumnsAsync()` instead.
* The obsolete `AutoFitAllColumns()` method is removed. Use `AutoFitAllColumnsAsync()` instead.
* When using [grouping and `OnRead`]({%slug components/grid/manual-operations%}#grouping-with-onread), casting `DataSourceResult.Data` to a list of objects (`.Cast<object>()`) is no longer needed.

## TextArea

Expand Down
Loading