Hi,
i can get the RecordCount with xamDataGrid1.RecordManager.GetFilteredInDataRecords().Count<DataRecord>();
But when the Application is starting first time and the control is creating, i can´t find the right moment to get the current count. I always get 0 for the record count.
In addition i load a custom filter with LoadCustomizations at the start time after the control was created. So they can be already some record filter set.
greetings
Hase1982
Hello,
Thank you for your post. I have been looking into and I can suggest you use the XamDataGrid’s Loaded event and check the Record’s Count in the handler.
Hope this helps you.
i have allready tried the Loaded event but this is throwing immediately after the control has been created and that´s too early because the DataContext hasn't been set yet.
thanks for your support
Hase
Hello Hase,
In that case yo ucan try the XamDataGrid's DataContextChanged event.
Hello Stefan,
thank you for your answer.
After i set the DataContext, i load Customization with LoadCustomizations. In these Customizations filter be already set, so i need the current record count after i have set these Customizations. Is there a event that is threw after the Method LoadCustomizations was executed.
You can use the XamDataGrid's RecordsInViewChanged, which is fired when the Records that are in view changes, so you will have to put a flag that indicates that the event is fired after the LoadCustomizations method is called.
this solution works, thank you.
I have a addiontal question concerning the LoadCustomizations method. Is it right that this method runs in a separate Thread ?
Is there a possibility to display the waiting cursor while the method is executing ?
The LoadCustomizations method is executed over the UI thread, but yo ucan still add an animation during teh XamDataGrid loads. Here Peter shared a sample application:
http://es.infragistics.com/community/forums/t/72122.aspx