Hi Samanvay,
Thank you for the update.
If you want to sort grouped column by clicking another column, then please try using ListSortSortDirection property in GroupedColumns by applying in TableControlCellClick event to achieve this behavior.
Refer the code below:
void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
GridTableCellStyleInfo sty = this.gridGroupingControl1.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
if (sty.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell && sty.TableCellIdentity.Column.Name == "task_index")
{
System.ComponentModel.ListSortDirection sort= this.gridGroupingControl1.TableDescriptor.GroupedColumns["group"].SortDirection;
if (sort == ListSortDirection.Ascending)
{
sort = ListSortDirection.Descending;
this.gridGroupingControl1.TableDescriptor.GroupedColumns["group"].SortDirection = sort;
}
else
{
sort = ListSortDirection.Ascending;
this.gridGroupingControl1.TableDescriptor.GroupedColumns["group"].SortDirection = sort;
}
e.Inner.Cancel = true;
}
}
Refer the modified sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/GGCControlModified.zipPlease let me know if you have any queries.
Regards,
Lingaraj S.