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(); }
public IEnumerator <object> GetEnumerator() { if (_values == null) { _values = _grid.ColumnNames.Select(c => GenericWebGrid.GetMember(this, c)); } return(_values.GetEnumerator()); }
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; }