// Load data public void LoadData( Array array ) { // this.array = array; // set column and row headers FixedRows = 1; FixedColumns = 1; // Redim the grid Redim( array.GetLength( 0 ) + FixedRows, array.GetLength( 1 ) + FixedColumns ); // Col Header Cell Template columnHeader = new CellColumnHeaderTemplate( ); columnHeader.BindToGrid( this ); // Row Header Cell Template rowHeader = new CellRowHeaderTemplate( ); rowHeader.BindToGrid( this ); // Header Cell Template (0,0 cell) cellHeader = new CellHeaderTemplate( ); cellHeader.BindToGrid( this ); // Data Cell Template dataCell = new CellArrayTemplate( array ); ; dataCell.BindToGrid( this ); RefreshCellsStyle( ); }
// Load data public void LoadData(Array array) { // this.array = array; // set column and row headers FixedRows = 1; FixedColumns = 1; // Redim the grid Redim(array.GetLength(0) + FixedRows, array.GetLength(1) + FixedColumns); // Col Header Cell Template columnHeader = new CellColumnHeaderTemplate(); columnHeader.BindToGrid(this); // Row Header Cell Template rowHeader = new CellRowHeaderTemplate(); rowHeader.BindToGrid(this); // Header Cell Template (0,0 cell) cellHeader = new CellHeaderTemplate(); cellHeader.BindToGrid(this); // Data Cell Template dataCell = new CellArrayTemplate(array);; dataCell.BindToGrid(this); RefreshCellsStyle(); }