I can't find any event telling me Summaries have been added to or removed from a grid band. Am I just missing them, or are there no such things?Thanks.
Hi,
I think you can use the Before/AfterSummaryDialog events.
Unfortunately those don't seem to be firing. At the moment I am plugging into the SummaryValueChanged event. Whilst this works, I fear it will be firing far more often than summaries just being added or removed and so won't be as efficient. That said, the code I need to run in this event is short, so it's not the end of the world - I was just looking for a better way.Thanks.
Yes, it's code where the summaries are being added, sorry, I should have been more clear. But the reason I need to know this in an event is because we subclass the UltraGrid to provide additional functionality that is common across our application. The grid itself needs to know when summaries are added so that it is self contained. Without this, we would have to find everywhere in our project that adds or removes summaries and copy the same code all over the place. Clearly this is inefficient and would be a maintenance burden.
As I said, I have a workaround, I was just looking for a better implementation.Thanks.
jcwild said:Unfortunately those don't seem to be firing.
These events fire whenever a user drops down the Summary dialog for a column. If the events are not firing, then I can only assume that your are adding the summaries in code and that they are not being added by the user. In such a case, since it's your code that is adding the summary, no event fires, but you already know you added a summary, so you don't need an event to tell you that it happened.