GridControl.RefreshDataSource() Method

Updates the GridControl.MainView to reflect changes made to a data source.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public virtual void RefreshDataSource()
Public Overridable Sub RefreshDataSource

Remarks

Call the RefreshDataSource method to update data displayed within the grid control's GridControl.MainView. The method reloads all records from the grid's associated data source for this purpose. Note that calling the method makes sense only when the bound data source doesn't support the IBindingList interface. Otherwise, the control will automatically update itself.

IMPORTANT

These automatic updates include information about added and\or removed rows. Changes made to existing rows are not recognized, unless the data source IBindingList object implements the System.ComponentModel.INotifyPropertyChanged interface.

To reload data within detail Views, use the ColumnView.RefreshData method.

NOTE

Do not call the RefreshDataSource method if you only need to update certain rows, since this method forces the entire grid to re-draw and negatively affects the application performance. In this scenario, utilize the ColumnView.RefreshRow method instead.

See Also