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
500
XamGrid - looking for event when grid is fully loaded
posted

Is there a way to identify when a XamGrid has been fully rendered and all data is loaded?  We have an issue where we're trying to re-apply filtering (via the persistence framework) however we can't apply that until the grid is completely loaded with data (otherwise there are errors, etc).  The Loaded event appears to get raised before the data is fully loaded.  Any other ideas?

Parents
  • 34690
    Offline posted

    Hello Dustin,

    Thank you for contacting Infragistics Developer Support.

    My team and I have done an initial investigation into whether or not there exists an event or property flag on the XamGrid control that designates that the grid is “fully” loaded. At the moment, the best single event I can currently recommend is usage of the Loaded event, as this designates that the grid is part of your application’s visual tree. Rather than just using this event, though, I would recommend inserting a Dispatcher.BeginInvoke action running at a DispatcherPriority of ApplicationIdle. This should wait until your application idles, giving the XamGrid time to finish its rendering operations. The code for this would look like the following:

    //In the Loaded event…
    Dispatcher.BeginInvoke(new Action(() => {
         //your persistence code here.
    }), DispatcherPriority.ApplicationIdle);

    I would expect that this would work as it should delay your persistence code enough that the grid should be “fully” loaded. If this is not the case, please let me know, and I will continue to investigate into other possibilities that you may be able to use.

    Please let me know if you have any other questions or concerns on this matter.

Reply Children
No Data