In the formula cell , we have to implement function like sum(1:2) which is equivalent to
sum(CurrentCol1:CurrentCol2).I have changed the code in ComputeSum function in the formula engine, but have some problems getting the CurrentCol index.
Currently I am using following piece of code
this.grid.currentcell.colindex(this gives an incorrect value if focus is moved to a different column).Please suggest an alternative method to get the correct column index.
Thanks in advance,
ADAdministrator Syncfusion Team March 8, 2005 12:12 PM
A formula may need to be evaluated more times than when it happens to be in the CurrentCell. For example, when the grid is displayed for any reason, all the cells are drawn (and formulas might be computed at this point), but the CurrentCell is not moved to every cell being drawn.
If you want to write column type formulas, then there is a supported notation of using Row 0 to represent the current row in the 3.0 code base. So, writing a formula like = A0 + B0 will sum up the A column value and B column value from what ever row this formula appears in. When the formula engine sees the reference to row zero, it resolves it to the row holding the formula. Take a look at the \Syncfusion\Essential Suite\18.104.22.168\Windows\Grid.Windows\Samples\Quick Start\GridControlSort for a sample use case.