Hi Sathishkumar,
Thank you for your interest in Syncfusion products.
To sort the underlaying datasource while sorting in UI to handle TableControlQueryAllowSortColumn and set the ApplySort method.
Please refer the code below for more details.
void TableControl_QueryAllowSortColumn(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowSortColumnEventArgs e)
{
CurrencyManager lm = this.BindingContext[this.gridGroupingControl1.DataSource] as CurrencyManager;
ListSortDirection direction=((IBindingList)lm.List).SortDirection;
if (direction == ListSortDirection.Ascending)
direction = ListSortDirection.Descending;
else
direction = ListSortDirection.Ascending;
if (lm.List is IBindingList && ((IBindingList)lm.List).SupportsSorting)
{
PropertyDescriptorCollection pdc = lm.GetItemProperties();
((IBindingList)lm.List).ApplySort(pdc[0], direction);
}
Console.WriteLine(((IBindingList)lm.List).SortDirection.ToString());
}
Please refer the attached sample for more details.
http://websamples.syncfusion.com/samples/Grid.Windows/I41988/main.htmBest Regards,
Asem.