Hi,
When I access any Row.HasChildren or Row.ChildBands and after that I set the grid ItemsSource to null, the UI freezes.
Please have a look at the attached sample.
Hello,
I am very glad that the my suggestion was helpful for you. Please let me know if you have any further questions on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I've tried you workaround and is working fine.
Thanks.
I am just checking if you require any further assistance on the matter.
I have been looking into the behavior that you are describing and it seems that it is caused by the deferred executing of the linq query which is executed by when one of the extension methods of IEnumerable<T> interface. When you set the ItemsSource of the XamDataGrid, the query is re-executed because the rows collection is changed and this seems to be the reason for this behavior. In order to avoid this behavior I can suggest using the Where method and calling the FirstOrDefault method to the result of the call of the Where method. Here is an example for that:
Row r = xamGrid1.Rows.Where(row => !row.HasChildren).FirstOrDefault(); if (r != null) { this.xamGrid1.ItemsSource = null; }
You can use the same approach for the second button as well.
If you have any further questions on the matter please do not hesitate to ask.
I have been looking into the issue that you have described and I have manage to reproduce it. I am currently investigating what the reason for it might be and I will follow up with you by the end of Thursday.
Thank you for your patience.