Esempio n. 1
0
        // 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( );
        }
Esempio n. 2
0
        // 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();
        }