All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
protected
void
RadGrid1_SortCommand(
object
sender, GridSortCommandEventArgs e)
{
GridSortExpression sortExpr =
new
GridSortExpression();
switch
(e.OldSortOrder)
case
GridSortOrder.None:
sortExpr.FieldName = e.SortExpression;
sortExpr.SortOrder = GridSortOrder.Descending;
e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
break
;
GridSortOrder.Ascending:
sortExpr.SortOrder = RadGrid1.MasterTableView.AllowNaturalSort ? GridSortOrder.None : GridSortOrder.Descending;
GridSortOrder.Descending:
sortExpr.SortOrder = GridSortOrder.Ascending;
}
e.Canceled =
true
RadGrid1.Rebind();
if
(!e.Item.OwnerTableView.SortExpressions.ContainsExpression(e.SortExpression))