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 }
            }));
        }
Exemplo n.º 2
0
 public IGridWithOptions <T> Sort(GridSortOptions sortOptions, string prefix)
 {
     _gridModel.SortOptions = sortOptions;
     _gridModel.SortPrefix  = prefix;
     return(this);
 }
Exemplo n.º 3
0
 public IGridWithOptions <T> Sort(GridSortOptions sortOptions)
 {
     _gridModel.SortOptions = sortOptions;
     return(this);
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }