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
1176
get total summaries
posted

Hi

 

How to have the sum of all childs on a grand total?  see example pic

Thanks.

  • 45049
    Verified Answer
    posted

    PAVCBC,

    If you're after grand-total information for data from child rows, you can add a summary to the root band of the grid based on a column in a child band.  To extend Manoj's examples, you would use something like this:

    ultragird.DisplayLayout.Bands[0].Summaries.Add(SummaryType.Sum, ultragird.DisplayLayout.Bands[1].Columns["ColumnName"]);

    Notice that this adds a summary to band 0 based on a column in band 1.

  • 345
    Suggested Answer
    posted

    To have  a summary of  parent rows 

    ultragird.DisplayLayout.Bands[0].Summaries.Add(SummaryType.Sum, ultragird.DisplayLayout.Bands[0].Columns["ColumnName"]);

     

    To have the summary for  Child rows

    just you have to change the Band[0] as Band[1]

    Like :

    ultragird.DisplayLayout.Bands[1].Summaries.Add(SummaryType.Sum, ultragird.DisplayLayout.Bands[1].Columns["ColumnName"]);

     

    Hope this would help you

     

    Regards,

    Manoj kumar

    09840507975