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
Thanks,
I hoped there would be another solution than using Microsoft UI Automation, but this solution fits for my issue.
Hi,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
Sincerely,Petar MonovDeveloper Support EngineerInfragistics Bulgariawww.infragistics.com/support
Of course I can explicitly call my event handler but I wanted also to test the data binding. So I will probably use Microsoft UI Automation.
If it is for testing purposes only why don't you call your event handler method explicitly in code?
Another thing you can use is Microsoft UI Automation which can simulate UI interaction.
Hope this helps.
Best regards Petar.
Hello,
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.