Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
9364
Summing a range of cells + associating a generated formula with a column
posted

From the Infragistics documentation, it sounds like I should be able to write a formula like sum( [Column001] : [Column120]) to add up the values in all 120 columns starting with column001. But the calculation fails at runtime if I do this. Is this kind of Excel-like range summation supported?

If not, the second question is I would be forced to use something like sum([Column001], [Column002], [Column003], ....., [Column120]).  Can I programmatically generate this string and associate the formula string to the unbound column? How do I programmatically associate a formula string with an unbound column?

Third question, is there a limit on the number of arguments to the sum() function? The Microsoft provided sum() function seems to limit it to 30 arguments but for the Infragistics sum function could handle over hundred when I tried thru designer. So is there a limit on the number of arguments?

Thanks!

 

 

Parents
  • 469350
    Verified Answer
    Offline posted

    vrn said:
    From the Infragistics documentation, it sounds like I should be able to write a formula like sum( [Column001] : [Column120]) to add up the values in all 120 columns starting with column001. But the calculation fails at runtime if I do this. Is this kind of Excel-like range summation supported?

     

    No, the CalcManager does not have any concept of the order of the columns in the grid so it can't do this sort of range summation. 

    vrn said:
    If not, the second question is I would be forced to use something like sum([Column001], [Column002], [Column003], ....., [Column120]).  Can I programmatically generate this string and associate the formula string to the unbound column? How do I programmatically associate a formula string with an unbound column?

    You set the Formula property on the column, just as you would at Design-time.

     

    vrn said:
    Third question, is there a limit on the number of arguments to the sum() function? The Microsoft provided sum() function seems to limit it to 30 arguments but for the Infragistics sum function could handle over hundred when I tried thru designer. So is there a limit on the number of arguments?

    I don't beleive there is any arbitrary limit on the number of arguments. If you do encounter a limitation, you should report it to Infragistics Developer Support as a bug. Submit a Support Issue

Reply Children