How to refresh data for RadGridView in multi user environment where multiple users are updating and viewing the same records

3 posts, 0 answers
  1. Mike
    Mike avatar
    11 posts
    Member since:
    Jun 2014

    Posted 12 Jun 2014 Link to this post

    Hello.  I am trying to solve the problem of keeping our data fresh using the Telerik WPF RadGridView.  I know that Telerik loads an in-memory copy of the collection that it binds to, but is there a way to keep it fresh?  We have a grid that queries 45,000 records.  Currently we have it working with a plain old windows grid by laoding in a page size at a time of records.  Because it goes back to the database each time we click the page buttons or do a sort or filter, the data stays fresh.  On the other hand, I also have a Telerik grid that queries the same set of records, but since it does not go back to the database for page operations and sorting and filtering, it gets stale data.  I verified this by updating some of the database fields and observing the old values instead of new ones.  Our work environment demands that the data be as fresh as possible (not just for insertion and deletion of records but for updating of existing records).  We have kicked around several ideas such as a refresh button, having a timer that goes back to the database to load every 15 minutes, or doing a database pull each time that the user does a paging, sort, or filter operation.  However, I am having a hard time finding the event in the RadGridPager that will let me make this call in the view model.  Is it even exposed?  Keep in mind that we are using MVVM, so I can use code behind if needed, but I would like to avoid that if possible.  Thank you.
  2. Maya
    Maya avatar
    4062 posts

    Posted 16 Jun 2014 Link to this post

    Hello Mike,

    Generally, if you implement INotifyPropertyChanged interface in your business object, RadGridView should know about those changes and update them right away. If you work with RadDataPager, you can handle its PageIndexChanging/PageIndexChanged events. If more appropriate you can work with EventToCommand pattern and handle those actions in your ViewModel. Is that what you are working for or am I missing anything ?

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Mike
    Mike avatar
    11 posts
    Member since:
    Jun 2014

    Posted 16 Jun 2014 in reply to Maya Link to this post

    Thanks, Myra.  Yes, we are moving toward handling those events in our viewmodel, which I have figured out how to do after posting this thread.  Thank you for your response.
Back to Top