private RouteValueDictionary CreateRouteValuesForSortOptions(GridSortOptions sortOptions, string prefix)
        {
            if (string.IsNullOrEmpty(prefix))
            {
                return(new RouteValueDictionary(sortOptions));
            }

            //There must be a nice way to do this...
            return(new RouteValueDictionary(new Dictionary <string, object>()
            {
                { prefix + "." + "Column", sortOptions.Column },
                { prefix + "." + "Direction", sortOptions.Direction }
            }));
        }
Beispiel #2
0
 public IGridWithOptions <T> Sort(GridSortOptions sortOptions, string prefix)
 {
     _gridModel.SortOptions = sortOptions;
     _gridModel.SortPrefix  = prefix;
     return(this);
 }
Beispiel #3
0
 public IGridWithOptions <T> Sort(GridSortOptions sortOptions)
 {
     _gridModel.SortOptions = sortOptions;
     return(this);
 }
Beispiel #4
0
 /// <summary>
 /// Specifies that the grid is currently being sorted by the specified column in a particular direction.
 /// This overload allows you to specify a prefix.
 /// </summary>
 public void Sort(GridSortOptions sortOptions, string prefix)
 {
     _sortOptions = sortOptions;
     _sortPrefix  = prefix;
 }
Beispiel #5
0
 /// <summary>
 /// Secifies that the grid is currently being sorted by the specified column in a particular direction.
 /// </summary>
 public void Sort(GridSortOptions sortOptions)
 {
     _sortOptions = sortOptions;
 }