Hi,
I want to implement the multicolumn sorting for radgrid placed in the user control .i have some default sorting (multi column) depends on the page where the user control is used . so , i have used the following code to set the default sorting in the user control ,
<
SortExpressions>
<telerik:GridSortExpression FieldName="SupplierDueDate" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="CountyName" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="Municipality" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="PostalCode" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="CooperativeHousing" SortOrder="Ascending" />
</
SortExpressions>
Then i planned to change these settings(i.e) the columns programmatically in the server side (to overrride these settings based on the page) like these:
case "MyOrders":
this.grdOrderList.MasterTableView.SortExpressions.Clear();
sortExpr =
new GridSortExpression();
sortExpr.FieldName =
"CreatedTime";
sortExpr.SortOrder =
GridSortOrder.Ascending;
this.grdOrderList.MasterTableView.SortExpressions.AddSortExpression(sortExpr);
break;
But this seems not working ... since using the sortExpression.Clear() i see a small command button in the headers of the column(just beside the column name ) .... please tell me where im going wrong with the possible solution to implement the above
thanks in advance,
Balajee