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
550
Efficiency in updating a few rows
posted

If I understand correctly anytime you set the UltraGrid.Datasource to a dataset the grid's existing rows are blown away. If this is the case, how do you update one or two rows with the latest values without resetting the datasource. The goal of this inquiry is to find a way to update a few records (1 or 2) with the latest values without having to redraw the entire grid. I know of the UltraGridRow.Refresh which seems to be useful if I knew how to refresh the underlying data without redrawing the grid.

Thanks for the help, Aaron

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Aaron,

    What kind of data source are you using? If you are using a DataSet, DataTable, UltraDataSource, or any other robust data source that implement IBindingList, then you don't have to do anything. IBindingList will notify the grid of any changes to the data source automatically. So simply added a row to a DataTable bound to the grid will update the grid with the new row without writing any code.

    If you are using a simpler data source like an IList, then you can update the data source and use the grid.Rows.Refresh method to force the grid to re-load the data. I'm not sure what you mean by you last sentence where you mention refreshing the underlying data without redrawing the grid.

Reply Children