|
|
| Issue Reports Total: 34163 Active: 375 Processed: 33788 Suggestions Total: 15015 Active: 579 Processed: 14436 Questions Total: 74352 Active: 96 Processed: 74256 1830 Knowledge Base Articles 663 Code Central Examples 27790 Support Center users 23 Online users |
|
 |
|  |
|
This website is powered by Developer Express ASP.NET technologies including the
ASPxMenu,
ASPxNavBar,
ASPxTabControl,
ASPxSiteMapControl,
ASPxPopupControl
and the ASPxGridView and Editors Suite.
Database connectivity is via eXpressPersistent Objects.
|
How to replace the navbar with a treelist?
| Article ID: |
AK17640 |
| Product Group: |
.NET |
| Product: |
eXpressApp Framework |
|
| Version(s): |
8.1.1 |
| Updated: |
18 Apr 2008 |
|
Description
I'm interested in multilevel navigation hierarchy and TreeList navigation inside NavBar group item. I'm thinking about solution similar to MSOutlook NavBar and mail folders structure inside. How can it be implemented?
screenshot.jpg
Solution
Applies to:
eXpressApp Framework To accomplish this, do the following: 1) Add a custom Template as shown in the How to: Customize a Template help topic. 2) By default, the Navigation Action is displayed via the NavBarActionContainer in the Windows Forms application. This Action Container creates the XtraNavBar control for the Action.
To create a tree list instead of the navigation bar, implement the TreeListActionContainer and TreeListActionNode classes as shown in the attached project. 3) Invoke the Designer for the MainForm Template added in step 1. Remove the existing NavBarControl from the form, then drag and drop the newly created TreeListActionContainer component on the form and set its Dock property to Fill. 4) Find all the entries of the deleted NavBarControl in the template's files and replace them in the required places with the TreeListActionContainer control. For instance:
[C#]
this.cOpenModule = new Solution1.Module.TreeListActionContainer();
[VB.NET]
Me.cOpenModule = New Solution1.Module.TreeListActionContainer()
5) Pay special attention to the following lines in the MainForm file. Modify the code as follows:
[C#]
List<IActionContainer> containers = new List<IActionContainer>(); containers.AddRange(new IActionContainer[]{ cAbout, cTools, cFile, cObjectsCreation, cPrint, cExport, cExit, cRecordEdit, cRecordsNavigation, cViewsHistoryNavigation, cFiltersSearch, cFilters, cView, cOptions, cOpenModule, cDiagnostic }); Initialize(mainBarManager, containers, new IActionContainer[] { cObjectsCreation, cRecordEdit, cView, cPrint, cExport }, viewSitePanel, null);
[VB.NET]
Dim containers As List(Of IActionContainer) = New List(Of IActionContainer)() containers.AddRange(New IActionContainer() { cAbout, cTools, cFile, cObjectsCreation, cPrint, cExport, cExit, cRecordEdit, cRecordsNavigation, cViewsHistoryNavigation, cFiltersSearch, cFilters, cView, cOptions, cOpenModule, cDiagnostic }) Initialize(mainBarManager, containers, New IActionContainer() { cObjectsCreation, cRecordEdit, cView, cPrint, cExport }, viewSitePanel, Nothing);
where cOpenModule is our TreeListActionContainer control. See Also:
How to implement your own Web action container
Attachments
Do you have any
comments?
We are eager to hear them!
How would you rate the quality of this content?
Average rating:
7
out of 9
4
people have rated this page
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
|
|
|
|
|
|