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
135
How to use Custom summary for adding the value of two diff grid column.
posted

I have 2 grid.

I want add summary  at the bottom of the second grid.

i want to add the frist grid active row cell value to the second grid sum of the one column.

so if i change my first grid row, second grid summary value suppose to be change based on value of the first grid cell value.

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    There are a number of ways you could achieve this. The fact that it's the ActiveRow and not just the first row or some other row that you could refer to by index makes it just a bit trickier.

    I think the easiest way to do this would be to create a class that implement ICustomSummaryCalculator and then use that for your summary.

    The interface has methods for when the summary begins, then a method for iterating the rows, and then a method for when the calculation is complete. So you can add up the values any way you want and reference any external values you need.

    The only caveat is that you will need to tell the second grid to re-calculate the summary whenever the ActiveRow in the first grid changes. This is very easy - you just trap the AfterRowActivate event of the first grid and call the Refresh method on the SummarySettings for the appropriate summary in the second grid.

     

Children
No Data