AD
Administrator
Syncfusion Team
November 28, 2006 04:58 AM UTC
Hi Prumery,
In DataBoundGrid, you can set these tag properties only through the Model.QueryCellInfo event handler. One way you can acheive this would be to set a flag in the your sort module and check this flag in order to enable the sorting icon for the header cell in the Model.QueryCellInfo.
//Or
You can use the DefaultView.Sort property of the underlying datasource in a grid to control the sort direction. Here is a code snippet to show this
DataTable dt = this.gridDataBoundGrid1.DataSource as DataTable;
//Ascending order.
//dt.DefaultView.Sort = "[ColumnName] ASC"; // or //dt.DefaultView.Sort = "[ColumnName]"
//descending order
//dt.DefaultView.Sort = "[ColumnName] DESC";
//Cancel the Sorting...
//dt.DefaultView.Sort = "";
this.gridDataBoundGrid1.Refresh();
Best Regards,
Haneef