This is a migrated thread and some comments may be shown as answers.

[Solved] sort event not triggered

1 Answer 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jo
Top achievements
Rank 1
jo asked on 14 Mar 2013, 02:30 PM
hello,
I am creating a grid server side in c# code:-

in CreateChildControls

rg.SortCommand += new GridSortCommandEventHandler(rg_SortCommand);
rg.MasterTableView.AllowSorting = true;
rg.MasterTableView.AllowCustomSorting = true;

I have enable sorting on each column created:-

boundColumn.AllowSorting = true;

The sort is enabled on each column. When i click on the column title there is a page postback but the event handler
"rg_SortCommand" is not called.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Mar 2013, 10:22 AM
Hi,

In order to provide your own custom sort order for a column, you can set AllowCustomSorting property of the corresponding table view.With custom sorting enabled, RadGrid displays the sorting icons but does not actually sort the data. Instead, you perform the custom sorting inside the SortCommand event handler. Check the following help documentation for more.
Applying Custom Sort Criteria

Thanks,
Shinu
Tags
Grid
Asked by
jo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or