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
420
Adding summary columns in parent band
posted

Hi All,

         I am making use of UltraWinGrid in my application. I have a parent band and two child bands in my grid. Now there are some columns in my child bands for which I want the summary in the parent band. I know that we can use summary rows to consolidate the values of a particular column. But the problem is that it doesn't appear as a column in the parent band and instead the summary row appears in the same band itself. So, is there an inherent property in UltraWinGrid which is helpful in achieving such a functionality? I hope my question is not obscure. I would attach a sample screenshot so that you would get a better overview of what my requisite is.

As you can see from the above screenshot, I have two childbands under a parent band. I have columns like estimated, actual and variance in the child band. Now is it possible to sum up all the values of estimated column and show it in the parent band with the same column name? I want similar functionality for actual,variance columns too. How to achieve such a functionality? Any help would be of great use.

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    There's a number of ways you could do this.

    • You could use an UltraCalcManager and apply a formula to the column in the parent band that references the column in the child band. 
    • You could add a summary to the child band and hide it. Then use the InitializeRow and populate the cells in the parent band with the value of the (hidden) summary in the child band.
    • You could use InitializeRow to calculate the value of the cells in the parent band yourself.

    The first option seems like the easiest one to me, depending on the calculations you need to perform and assuming that the formula can handle it.

Children