Example #1
0
        public IGridWithOptions <T> Columns(Action <ColumnBuilder <T> > columnBuilder)
        {
            var builder = new ColumnBuilder <T>();

            columnBuilder(builder);

            foreach (var column in builder)
            {
                if (column.Position == null)
                {
                    gridModel.Columns.Add(column);
                }
                else
                {
                    gridModel.Columns.Insert(column.Position.Value, column);
                }
            }

            return(this);
        }
Example #2
0
 /// <summary>
 /// Creates a new instance of the GridModel class
 /// </summary>
 public GridModel()
 {
     emptyText     = "There is no data available.";
     columnBuilder = CreateColumnBuilderWrap();
 }