Unplanned
Last Updated: 17 May 2022 07:50 by ADMIN
Steven
Created on: 07 Jul 2021 11:51
Category: Grid
Type: Feature Request
8
Add AllowUnsort setting

Add a setting similar to the AllowUnsort so that I can disable the unsorted state of the Grid.

ADMIN EDIT:

Here is how to achieve this with the Grid state.

4 comments
ADMIN
Dimo
Posted on: 17 May 2022 07:50

Thanks for your contribution, Marco!

Marco
Posted on: 16 May 2022 20:46

I think the suggested workaround doesn't work correctly when the grid has Column Virtualization.

I implemented it for a Grid with Column Virtualization and the first time the user changes the sorting it goes to the Unsorted state, because for some reason the state's SortDescriptors list is empty. After that first time sorting, the workaround works properly.

Not a big deal but wanted to give that info.

Right now I'm fixing it manually with:               

if (desiredState.SortDescriptors.Count == 0)
{
desiredState.SortDescriptors.Add(new SortDescriptor
{
SortDirection = ListSortDirection.Ascending,
Member = DefaultSortColumnName
});
}
ADMIN
Dimo
Posted on: 16 Mar 2022 10:32

Hi Marco,

I fixed the link, thanks.

The example throws an error during sorting, but I think it's something related to the REPL environment and not the example itself. We will look into this.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Marco
Posted on: 15 Mar 2022 12:47
The link of "How to achieve this" is not working, could you provide an example for that?