Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        /// <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&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="column">The column.</param>
 public GridActionCommandFactory(GridActionColumn <T> column)
 {
     Column = column;
 }
Ejemplo n.º 6
0
 public GridActionColumnTests()
 {
     column = new GridActionColumn <Customer>(GridTestHelper.CreateGrid <Customer>());
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GridActionCommandFactory&lt;T&gt;"/> 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;
 }