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
585
Refreshing grids
posted

Hi

 

I have two forms in my application, Form two has a wingrid and Form one is a data entry page. When a user enters data on form one I wish for this to be reflected on my grid. However it is a multi user application so many users may adding data from different workstations (into the DB), so what is the best solution for this, as potentially people maybe using the grid for stuff, so I do not wish for just an unseemly refresh every 30 seconds or the like. Do you have any ideas on how best to get the grid refreshed without spoiling user experience?

 

Thanks alot.

dave

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    Typically the data provider supports some form of notification when records change; for example, for SQLServer, there is a SqlDependency class which notifies the listener when a record has changed. In your case you would listen to an event (such as, in the SqlDependency example, the 'OnChange' event) and refresh the grid's data source when that event fires.

Children