Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
10031 | Jan 20,2004 09:36 PM UTC | Jan 22,2004 04:43 PM UTC | WinForms | 5 |
![]() |
Tags: GridControl |
//register 3 grids so cell can be referenced across grids
int sheetfamilyID = GridFormulaEngine.CreateSheetFamilyID();
GridFormulaEngine.RegisterGridAsSheet("summary", this.gridControl1.Model, sheetfamilyID);
GridFormulaEngine.RegisterGridAsSheet("income", this.gridControl2.Model, sheetfamilyID);
GridFormulaEngine.RegisterGridAsSheet("expenses", this.gridControl3.Model, sheetfamilyID);
//....
//Sample formula usage for cells in gridControl1, the ''summary'' grid.
//This code sums ups some cells from gridControl3, the ''expenses'' grid,
//and gridControl2, the ''income'' grid.
//sum the range B2:B8 from the expenses grid.
this.gridControl1[3,4].Text = "= Sum(expenses!B2:expenses!B8)";
//sum the range B2:B4 from the income grid.
this.gridControl1[4,4].Text = "= Sum(income!B2:income!B4)";
>//register 3 grids so cell can be referenced across grids
>int sheetfamilyID = GridFormulaEngine.CreateSheetFamilyID();
>GridFormulaEngine.RegisterGridAsSheet("summary", this.gridControl1.Model, sheetfamilyID);
>GridFormulaEngine.RegisterGridAsSheet("income", this.gridControl2.Model, sheetfamilyID);
>GridFormulaEngine.RegisterGridAsSheet("expenses", this.gridControl3.Model, sheetfamilyID);
>
>//....
>
>//Sample formula usage for cells in gridControl1, the ''summary'' grid.
>//This code sums ups some cells from gridControl3, the ''expenses'' grid,
>//and gridControl2, the ''income'' grid.
>
>//sum the range B2:B8 from the expenses grid.
>this.gridControl1[3,4].Text = "= Sum(expenses!B2:expenses!B8)";
>
>//sum the range B2:B4 from the income grid.
>this.gridControl1[4,4].Text = "= Sum(income!B2:income!B4)";
>
>
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.