I am trying to unit test the group fields behavior of my XamDataGrid.
I tried this:
FieldSortDescription sortDescription = new FieldSortDescription();sortDescription .FieldName = "FirstFieldName";sortDescription.IsGroupBy = true;
grid.FieldLayouts[0].SortedFields.Clear(); grid.FieldLayouts[0].SortedFields.Add(sortDescription);
Unfortunately, the event handler associated to the Grouped event of my grid is never called.
Does anybody have an idea of what is missing?
Thanks
Hello,
I have been looking into your issue and this behavior is expected since most event are only triggered by changes made through the UI. This is decided on since if a developer is performing some action he can also react to it in code and this also saves a ton of events from firing all the time which would drastically decrease performance.
If you were to describe what are you trying to use this for I might be able to suggest something more suitable.
Looking forward to hearing from you.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
I would like to test the binding between the Grouped event and my event handler and also the behavior of my event handler in a unit test.That's why I want to simulate this Grouped event.
Regards.