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
745
How to simulate Group Fields
posted

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

Parents
No Data
Reply
  • 27093
    posted

    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

     

     

Children