Hi, could you help me?
How can I get a RowIndex inside formula?
Sample:
Column.Formula = "if (odd(RowIndex), [value1], [value2])"
Thanks, Alexandr.
Hi Alexandr,
I don't think there is a function that will get you the index of a row. But there are a couple of ways you could achieve what you want.
What I would do is simply add an unbound column your grid and hide it. Use the InitializeRow event to populate this column with the row's index and then use that column to get the index into your formula using the column name.
Another option would be to just use the InitializeRow event to populate the value of the formula column yourself - without using a formula.