Skip to content

Commit 8e0735f

Browse files
committed
update kb
1 parent 085a594 commit 8e0735f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

knowledge-base/dropdownlist-custom-sorting-order-groups.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Custom Sorting Order for Groups in DropDownList
3-
description: Learn how to apply a custom sorting order to groups in the DropDownList for Blazor.
3+
description: Learn how to apply a custom order to groups in the DropDownList for Blazor.
44
type: how-to
5-
page_title: How to Set a Custom Sorting Order for Groups in Blazor DropDownList
5+
page_title: How to Set a Custom Grouping Order in Blazor DropDownList
66
slug: dropdownlist-custom-sorting-order-groups
77
tags: dropdownlist, blazor, telerik, grouping, custom order
88
res_type: kb
@@ -26,18 +26,18 @@ ticketid: 1666981, 1579415
2626

2727
## Description
2828

29-
I using the [grouping feature of the DropDownList]({%slug components/dropdownlist/grouping%}). My DropDownList model has a nested model. The DropDownList `GroupField` parameter is bound to the nested model property. I want the groups to appear in a non-alphabetical, custom order. How can I customize the group order in the DropDownList?
29+
I am using the [grouping feature of the DropDownList]({%slug components/dropdownlist/grouping%}). My DropDownList model has a nested model as property. The DropDownList `GroupField` parameter is bound to a property of the nested model. I want the groups to appear in a non-alphabetical, custom order. How can I customize the grouping order in the DropDownList?
3030

3131
## Solution
3232

33-
To sort groups in a DropDownList by a custom order, perform a manual sorting operation in the [`OnRead` event]({%slug components/dropdownlist/events%}#onread) handler. Follow these steps:
33+
To sort the groups in a DropDownList by a custom order, perform a manual sorting operation in the [`OnRead` event]({%slug components/dropdownlist/events%}#onread) handler. Follow these steps:
3434

3535
1. Create a list of strings that represents the values of the group headers. This list will determine the preferred sorting order.
3636
2. Cast the [`DataSourceResult`]({%slug common-features-data-binding-onread%}#event-argument) to [`AggregateFunctionsGroup`](/blazor-ui/api/Telerik.DataSource.AggregateFunctionsGroup).
3737
3. Sort the casted data using the [`Sort` method](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.sort?view=net-8.0) with a custom comparison function.
38-
4. Pass the sorted data as `args.Data`({%slug common-features-data-binding-onread%}#todatasourceresult-method) .
38+
4. Pass the sorted data as [`args.Data`]({%slug common-features-data-binding-onread%}#todatasourceresult-method).
3939

40-
>caption Apply a sorting order to groups in the DropDownList
40+
>caption Apply a custom grouping order in the DropDownList
4141
````CSHTML
4242
@using Telerik.DataSource.Extensions
4343
@using Telerik.DataSource

0 commit comments

Comments
 (0)