When the column header of a RadGridView is clicked, it fires the SortChanging event.
In this event, I am executing the following code:
Telerik.WinControls.UI.GridViewTemplate gwt = (Telerik.WinControls.UI.GridViewTemplate)sender;
Telerik.WinControls.Data.SortDescriptor sort = (Telerik.WinControls.Data.SortDescriptor)e.NewItems[0];
Telerik.WinControls.Data.SortDescriptor sort1 = new Telerik.WinControls.Data.SortDescriptor()
{
PropertyName = "sortorder",
irection = System.ComponentModel.ListSortDirection.Ascending
};
gwt.SortDescriptors.Clear();
gwt.SortDescriptors.Add(sort1);
gwt.SortDescriptors.Add(sort);
This re-fires the SortChanging event, resulting in an infinite loop.
How can I suppress the refiring of the SortChanging event?