Hello,
suppose you have a grid with 2 column, a bool column and a double one. Also, you have two texbox, on the first show the sum of the double cells only where the bool cell value is true, on the second textbox the same as the first but sum if the cell value if false.
i have tried but it does not work. Any idea why?
As attachment the sample project
Thank you.
The problem is with your "if" function. You are trying perform an 'if' check on the condition that the column reference is true. But a column reference like "[//ultraGrid/Band 0/BOOL_COLUMNS]" refers to the entire column. It does not evaluate each cell in the column. So you are comparing the entire column to a single boolean value and this will never be true. It's not a valid comparison.
The way to do something like this would be to add an unbound column to the grid with a formula like this:
"if ([BOOL_COLUMNS], DOUBLE_COLUMN, 0)"
Then you could sum this unbound column and you would end up with a sum where the value of the boolean column is true.
Hi Mike,
i prefer to create a method that does this calculations and not use the wincalcmanager and add other columns to the grid.