Hi,
In my application, for the wingrid i have added a Summary for few of the columns. The summary works fine when the grid is bounded with data. Also when any filter is applied for any of the grid columns etc.
For the gird i have set the option to select multiple rows (by moving the mouse over rows headers , also holding the shift button and click on the required rows)
Now we want to refresh the Summary total for the selected records (rows). (sample screen shot attached, selected records background color are changed)
Can anyone suggest how to refresh the summary for the only selected rows ?
Thanks,
Narasimha
You can create a class that implements the ICustomSummaryCalculator interface (only three methods). This is the interface with which the grid's summary compilation logic communicates, so you effectively take control over the summary calculations by doing this. In your 'AggregateCustomSummary' method implementation, you would add the cell values only for the selected rows.
i have the same problem as nranga shown in the msg before.
I implemented a class based on iCustomSummaryCalculator. In the 'AggregateCustomSummary' i add only when row.selected is true. It doesn't work.
The SummaryCalculator will only reached one-times after filling the grid (I set a stop at BeginCustomSummary), but not when i select a row ore also more rows.
I assumed that the SummaryCalculator will start to recalculate after changing selection. But it isn't.
How can I initialize the recalculating, maybe from after selectchanged event or similiar.
Any help is welcomed.
Wolfgang
Hi Brian,
I did something similar, in the AfterRowSelected event i am looping through the selected row collection and doing the necessary math operation on the columns for which i need the summary.
I had used the approach which you mentioned for doing a distinct count of values for a certain column, this approach is used to shown summary when the grid is bound with data and when a row filter is applied.
thanks for your suggestion
narasimha