Back to Devexpress

TreeList.RefreshDataSource() Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-2691df00.md

latest2.6 KB
Original Source

TreeList.RefreshDataSource() Method

Updates the Tree List control to reflect changes made to a data source.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public virtual void RefreshDataSource()
vb
Public Overridable Sub RefreshDataSource

Remarks

Call the RefreshDataSource method to update data displayed within the Tree List. This method reloads all the records from the Tree List’s associated data source. Note that calling this method makes sense only when the bound data source doesn’t support the IBindingList interface. Otherwise, the control will automatically update itself, since such data sources provide notifications of data changes.

When a Tree List is in the unbound mode, calling the RefreshDataSource method has no effect.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RefreshDataSource() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-win-gantt-control/CS/XPO/GanttSolutionXPO/GanttSolutionXPO.Win/Editors/CustomGanttEditor.cs#L41

csharp
control.DataSource = controlDataSource;
    control.RefreshDataSource();
}

See Also

DataSource

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace