windowsforms-devexpress-dot-xtratreelist-dot-treelist-4ed638c2.md
Forces the Tree List to finish its initialization.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
public virtual void ForceInitialize()
Public Overridable Sub ForceInitialize
You must call the ForceInitialize method before changing a TreeList’s options when a form is being loaded. After the Tree List has been initialized, you can manipulate its settings safely. For instance, you should call the ForceInitialize method before:
The following code snippets (auto-collected from DevExpress Examples) contain references to the ForceInitialize() 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.
winforms-treelist-sync-position-of-nodes-with-data-records/CS/Q351285/Form1.cs#L20
private void InitTreeList() {
treeList1.ForceInitialize();
UpdateNodesPositions(treeList1.Nodes);
winforms-treelist-unbound-columns/CS/TreeList_UnboundDataViaEvent/Form1.cs#L41
// Resize columns proportionally.
treeList1.ForceInitialize();
treeList1.BestFitColumns();
winforms-treelist-sync-position-of-nodes-with-data-records/VB/Q351285/Form1.vb#L26
Private Sub InitTreeList()
treeList1.ForceInitialize()
UpdateNodesPositions(treeList1.Nodes)
winforms-treelist-unbound-columns/VB/TreeList_UnboundDataViaEvent/Form1.vb#L36
' Resize columns proportionally.
treeList1.ForceInitialize()
treeList1.BestFitColumns()
See Also