This question is locked. New answers and comments are not allowed.
Hi,
I am doing custom sorting on a RadGridView and have a question about the sort indicators. When I implement custom sorting code similar to the example here, the previously sorted column's indicator does not clear when a new column is sorted, as if you were doing multi column sorting. This happens regardless of what the IsCustomSortingEnabled property is set to. I can work around this by looping through the column collection and setting the sorting state to none for the appropriate columns during the Sorting event. A sample of my sorting code is below.
Is the need to manually clear the sort indicators expected functionality? Also, can you explain what the IsCustomSortingEnabled property does? The documentation does not really provide much info.
Thanks.
I am doing custom sorting on a RadGridView and have a question about the sort indicators. When I implement custom sorting code similar to the example here, the previously sorted column's indicator does not clear when a new column is sorted, as if you were doing multi column sorting. This happens regardless of what the IsCustomSortingEnabled property is set to. I can work around this by looping through the column collection and setting the sorting state to none for the appropriate columns during the Sorting event. A sample of my sorting code is below.
Is the need to manually clear the sort indicators expected functionality? Also, can you explain what the IsCustomSortingEnabled property does? The documentation does not really provide much info.
Thanks.
private void Grid_Sorting(object sender, GridViewSortingEventArgs e){ if (e.OldSortingState == SortingState.None) { e.NewSortingState = SortingState.Ascending; //Call Custom Sort Logic } else if (e.OldSortingState == SortingState.Ascending) { e.NewSortingState = SortingState.Descending; //Call Custom Sort Logic } else { e.NewSortingState = SortingState.None; //Call Custom Sort Logic } e.Cancel = true;}