public static string AddSortExpression(string sortMetaData, SortExpression sortExpression) { SortExpressionCollection sortExpressions = PagedInfo.GetSortExpressions(sortMetaData); int num = sortExpressions.FindIndex((SortExpression s) => s.Expression == sortExpression.Expression); if (num != 0) { if (num > 0) { sortExpressions.RemoveAt(num); } sortExpressions.Insert(0, sortExpression); if (sortExpressions.Count > 3) { sortExpressions.RemoveRange(3, 1); } } else { sortExpressions[0].ToggleDirection(); } return(sortExpressions.Serialize()); }
public SortExpressionCollection GetSortExpressions() { return(PagedInfo.GetSortExpressions(this.SortMetaData)); }
public static string GetSortDescription(string sortMetaData) { return(PagedInfo.GetSortExpressions(sortMetaData).ToString()); }