Пример #1
0
        public virtual void LoadDataSource(DataItem data)
        {
            this.data = data;

            SetDim();

            //Col Header Cell Template
            colHeaderCell = new CellColumnHeaderTemplate(data);
            colHeaderCell.BindToGrid(this);

            //Row Header Cell Template
            rowHeaderCell = new CellRowHeaderTemplate();
            rowHeaderCell.BindToGrid(this);

            //Data Cell Templates
            x = new CellDataTemplate(data);
            x.BindToGrid(this);
            y = new CellDataTemplate(data);
            y.BindToGrid(this);
            z = new CellDataTemplate(data);
            z.BindToGrid(this);
            dx = new CellDataTemplate(data);
            dx.BindToGrid(this);
            dy = new CellDataTemplate(data);
            dy.BindToGrid(this);
            dz = new CellDataTemplate(data);
            dz.BindToGrid(this);

            //Formula Cell Template
            formulaCell = new CellFormulaTemplate(data);
            formulaCell.BindToGrid(this);

            RefreshCellStyle();
        }
Пример #2
0
        public virtual void LoadDataSource(DataItem data)
        {
            this.data = data;

            Redim(data.Length + M + 1, 5);

            //Col Header Cell Template
            colHeaderCell = new CellColumnHeaderTemplate();
            colHeaderCell.BindToGrid(this);

            //Row Header Cell Template
            rowHeaderCell = new CellRowHeaderTemplate();
            rowHeaderCell.BindToGrid(this);

            //Header Cell Template (0,0 cell)
            headerCell = new CellHeaderTemplate();
            headerCell.BindToGrid(this);

            //Data Cell Template
            x  = new CellXDataTemplate(data);
            y  = new CellYDataTemplate(data);
            dx = new CellDXDataTemplate(data);
            dy = new CellDYDataTemplate(data);
            x.BindToGrid(this);
            y.BindToGrid(this);
            dx.BindToGrid(this);
            dy.BindToGrid(this);

            //Formula Cell Template
            formula = new CellFormulaTemplate(data);
            formula.BindToGrid(this);

            RefreshCellStyle();
        }