private static IDictionary <string, object> JsonForActionColumn <T>(Action <GridActionColumn <T> > configure) where T : class { var column = new GridActionColumn <T>(GridTestHelper.CreateGrid <T>()); configure(column); return(column.CreateSerializer().Serialize()); }
public GridActionColumnBuilder <T> Command(Action <GridActionCommandFactory <T> > commandAction) { var column = new GridActionColumn <T>(GridModel); commandAction(new GridActionCommandFactory <T>(column, GridModel.Context)); GridModel.ColumnList.Add(column); return(new GridActionColumnBuilder <T>(column)); }
/// <summary> /// Defines a command column. /// </summary> /// <param name="commandAction"></param> /// <returns></returns> public virtual GridActionColumnBuilder Command(Action <GridActionCommandFactory <TModel> > commandAction) { GridActionColumn <TModel> column = new GridActionColumn <TModel>(Container); commandAction(new GridActionCommandFactory <TModel>(column)); Container.Columns.Add(column); return(new GridActionColumnBuilder(column)); }
public GridActionColumnTests() { column = new GridActionColumn<Customer>(GridTestHelper.CreateGrid<Customer>()); }
/// <summary> /// Initializes a new instance of the <see cref="GridActionCommandFactory<T>"/> class. /// </summary> /// <param name="column">The column.</param> public GridActionCommandFactory(GridActionColumn <T> column) { Column = column; }
public GridActionColumnTests() { column = new GridActionColumn <Customer>(GridTestHelper.CreateGrid <Customer>()); }
/// <summary> /// Initializes a new instance of the <see cref="GridActionCommandFactory<T>"/> class. /// </summary> /// <param name="column">The grid column.</param> /// <param name="context">ViewContext</param> public GridActionCommandFactory(GridActionColumn <T> column, ControllerContext context) { Column = column; Context = context; }