We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon


Hi Clay, 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, Regards, Manohar B.

1 Reply

AD Administrator Syncfusion Team March 8, 2005 05:12 PM UTC

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\\Windows\Grid.Windows\Samples\Quick Start\GridControlSort for a sample use case.

Live Chat Icon For mobile
Up arrow icon