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
210
Summary Total of Dynamic Columns
posted

This is probably easy but I can not get it to work for me. I assign the datasource to my grid dynamically which also includes some of the column names. I am trying to create a Totals column at the end that adds up a few of my other columns. 

For example, my datasource returns the Column Names "Location", "YSB", "YC", and "SOR".  I set the binding on the grid to this datasource. I want a total of the last 3 columns in a column named "Totals". I get the column created but when I try to set the formula to something like "[YSB] + [YC]", I get the #REF error in the column.  I dont know why it isnt accepting the column names I am giving it.  I have even tried to just throw one column name in the formula by getting key to Column(1) in the line right before I set the formula. That returns "YSB" and I then stick that in my formula and I still get the REF.  I can throw a simple 10 * 10 in the formula and I get 100, but can not do column names. One test I did was below. I would think this is simple, but maybe I am ignorant !

 

 

Me.grdLoadoutCommoditySummary.Bands(0).Columns("Totals").Formula = "[YSB]"

Any ideas what is going wrong?  thanks

  • 469350
    Offline posted

    Hi,

    I don't see any reason why this would not work. Can you duplicate this in a small sample project and post it here so I can take a look?