Пример #1
0
 public GenericWebGridRow(GenericWebGrid webGrid, object value, int rowIndex)
 {
     _grid     = webGrid;
     _value    = value;
     _rowIndex = rowIndex;
     _dynamic  = value as IDynamicMetaObjectProvider;
 }
        public GenericPreComputedGridDataSource(GenericWebGrid grid, IEnumerable <dynamic> values, int totalRows)
        {
            Debug.Assert(grid != null);
            Debug.Assert(values != null);

            _totalRows = totalRows;
            _rows      = values.Select((value, index) => new GenericWebGridRow(grid, value: value, rowIndex: index)).ToList();
        }
Пример #3
0
 public IEnumerator <object> GetEnumerator()
 {
     if (_values == null)
     {
         _values = _grid.ColumnNames.Select(c => GenericWebGrid.GetMember(this, c));
     }
     return(_values.GetEnumerator());
 }
Пример #4
0
        public GenericWebGridDataSource(GenericWebGrid grid, IEnumerable <dynamic> values, Type elementType, bool canPage, bool canSort)
        {
            Debug.Assert(grid != null);
            Debug.Assert(values != null);

            _grid        = grid;
            _values      = values;
            _elementType = elementType;
            _canPage     = canPage;
            _canSort     = canSort;
        }