Intersoft WebGrid Documentation
TreeView Mode
See Also Send comments on this topic.
Intersoft WebGrid > Learning More > Working with Self Referencing Table > Customizing Self Reference Table > TreeView Mode

Glossary Item Box

With more styles and appearance customizability, automatic columns fitting, condition-based formatting and more, WebGrid.NET SelfReference introduce a TreeView selection mode which will make application development easier, for example : Outlook 2003, Support Management System, Discussion Board.

Designer

In order to make a grid with TreeView selection mode, we need to set the IsTreeViewSelectionMode to true. Please check sample code belows:

C# Copy Code
WebGrid1.RootTable.SelfReferencingSettings.Enabled = true;
WebGrid1.RootTable.SelfReferencingSettings.ParentDataMember = "FolderID";
WebGrid1.RootTable.SelfReferencingSettings.ChildDataMember = "ParentFolderID";
WebGrid1.RootTable.SelfReferencingSettings.ExpandColumnMember = "Name";
WebGrid1.RootTable.SelfReferencingSettings.IsTreeViewSelectionMode=True;
WebGrid1.RootTable.SelfReferencingSettings.ParentRootMode =
    ISNet.WebUI.WebGrid.ParentRootMode.UseParentRootValue;


This is the result of the TreeView mode sample using SelfReference feature of WebGrid :

treeview

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.