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
445
newbie question
posted

I would like to use cal manager to sum columns 5 thru 10 on band 0, row 0 and place the SUM in a ultracurrency editor. I have tried many iterations but always get Invalid or unavailable reference. The grid is loaded from a business object at runtime and not from the designer. I have set up the editor per one of the example apps for only 1 column for testing and still does not work. Any pointers would be most appreciated.

 Dim calcSettings As CalcSettings = Nothing

        calcSettings = Me.ultraCalcManager1.GetCalcSettings(Me.pvNet)
        calcSettings.Alias = "NetAmount"
        calcSettings.PropertyName = "Value"
        calcSettings.Formula = "sum([Me.grdSummary.DisplayLayout.Bands(0)/Column 5])"

 

 

Parents
No Data
Reply
  • 48586
    Suggested Answer
    posted

    Hello,

     

    As far as I understand your scenario you want to use UltraCalckManger to sum  the values of cells of column 5 to column 10 of the first Band,  only of  first row. I have created a sample to illustrate how you could do this with UltraCalckManager, where I am using NamedReference to get the cells values from the first row and to display this sum in UltraCurrencyEditor. Please run the sample and let me know if this is what you are looking for. Another way to achieve your goal (if you will summing only 5 cells of the grid) is to handle InitializeRow event of the grid, to chect if e.Row.Index is 0 and to sum the needed cell and to set this sum as value of the UltraCurrencyEditor.

     

    Please let me know if you have any further questions.

    WindowsApplication1.zip
Children