This is a migrated thread and some comments may be shown as answers.

Showing new form/panel on GroupExpandedChanged

5 Answers 77 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Ching
Top achievements
Rank 1
David Ching asked on 25 Aug 2008, 12:51 AM
Hello, I am sure this is a simple question but I can't find any example.  I am implementing an Outlook-like functionality, that means there is a RadPanel docked on the form's left edge.  When a Group in the RadPanel is selected, then the rest of the form (to the right of the RadPanel) should show different content.  For example, when the Contacts group is selected, then the form should show contacts, and when Mail is selected, the form should show mail messages. 

How do I do this?  Is the Contacts and Mail content supposed to go into a new form or panel that I am supposed to show and hide when the appropriate Group is selected?  How do I design the content using the forms designer so I can drag and drop controls onto it?

BTW, the RadTabStrip works exactly like how I want; when I click on a Tab in the designer, it shows the selected tab item's ContentPanel so I can drop controls onto it, and at runtime it shows the ContentPanel when I click on the tab. 

How to get this functionality using the RadPanel instead of RadTapStrip?

Thanks,
David

5 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 27 Aug 2008, 12:00 PM
Hi David Ching,

RadPanelBar has its own ContentPanels for each RadPanelBarGroupElement. In order to enable them, you should set RadPanelBarGroupElement.EnableHostControlMode to True. Speaking about the Outlook-like functionality, these content panels will hold RadTreeView for mail categories, several RadCalendars, RadRadioButtons, etc. - whatever is suitable to your scenario for the RadPanelBar's ContentPanels.

However, for the content on the right part of the form, you should use separate RadPanels. The approach I would suggest for designing these RadPanels is the following:
  1. Assume that we have a RadPanelBar docked to the left and two groups inside it.
  2. Drag a RadPanel on the form and set its Dock to Fill.
  3. Drag the appropriate content on this panel.
  4. Now we want to setup another RadPanel. For this purpose, undock the first RadPanel and place it somewhere else in the form (temporarily).
  5. Drag a new RadPanel on the form and set its Dock to Fill.
  6. Fill it with its appropriate content.
  7. Now we have two RadPanels ready. However, the first is not positioned in the form properly. To do this, in the Properties pane select the first RadPanel from the combobox and set its Dock to Fill. This will result in two RadPanels with appropriate location and size and with the necessary content in them.
  8. Since you want to show a specific RadPanel at a time, again from the control combobox in the Properties pane choose the RadPanels and set their Visibility to False.
  9. Wire the necessary events to the RadPanelBar and show/hide the corresponding RadPanels when these events are fired.
If you have additional questions, feel free to contact me.

Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Ching
Top achievements
Rank 1
answered on 27 Aug 2008, 05:33 PM
Thank you so much, Nokolay, for taking the time to answer my question so well!  It works great.

Perhaps this would be good tutorial to add?  "Creating an Outlook like frame".

Thanks,
David
0
Nikolay
Telerik team
answered on 29 Aug 2008, 03:53 PM
Thank you for the nice feedback, David!

Indeed, it is a good idea to turn my response into a How-To tutorial. I will consider creating a Knowledge Base article for it and then add it to the documentation.

If you have additional questions, feel free to contact me.

 
Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Ching
Top achievements
Rank 1
answered on 29 Aug 2008, 08:56 PM
Nikolay, the article would be great!

BTW, for step #8, it is easier to activate the desired RadPanel in the Designer by choosing it from the combobox (at top of Properties pane), then right click on whitespace on the form (not on the panel) and choose Bring To Front.

In one step you can activate the desired panel, and not have to set the Visibility properties of all the other panels.

Cheers,
David
0
Nikolay
Telerik team
answered on 02 Sep 2008, 12:44 PM
Hello David Ching,

Thank you for the nice suggestion. I will consider including it in a future "How-to" tutorial.

If you have additional ideas to share with me about our Help Documentation, I will be glad to process them further.

 
All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
David Ching
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
David Ching
Top achievements
Rank 1
Share this question
or