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
75
Limited update on Grid
posted

I have an application which through several end users will all be providing updates to the same database.

When an update is made I'm sending an message containing the primary key of the row that has updated. The question is, can I update the visible grid with just that selected information instead of refilling the entire grid? For a table that has 11,000 rows it would seem impractical to update the entire thing for one row change.

 

Thanks in advance of your help

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

     You should certainly not have to reset the whole grid.

    How you do this depends on your data source. If you are using an IBindingList, then adding a row to the Data Source will automatically notify the grid that a new rows was added and the grid will display the new row. 

    If your data source is not an IBindingList, but rather just an IList, then there are no notifications, but you can tell the grid to refresh by calling grid.Rows.Refresh(ReloadData). 

Children
No Data