I would like my panel to always have every item expanded. I would also like to prevent users from clicking on the panel. I am binding the panel to a site map, and I want the user to be able to see where they're at in the wizard, but I don't want them to navigate via the panel. Are there properties I can set to allow this?
4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 12 Apr 2010, 11:18 AM
Hello Bill,
You can try the following code snippet in order to expand all the items.
CS:
Attach the 'OnClientItemClicking' event to RadPanelBar and use the args.set_cancel(true) in order to cancel the event.
JavaScript:
Thanks,
Princy.
You can try the following code snippet in order to expand all the items.
CS:
| protected void RadPanelBar1_PreRender(object sender, EventArgs e) |
| { |
| foreach(RadPanelItem item in RadPanelBar1.GetAllItems() ) |
| { |
| if (item.Items.Count>0) |
| { |
| item.Expanded = true; |
| } |
| } |
| } |
Attach the 'OnClientItemClicking' event to RadPanelBar and use the args.set_cancel(true) in order to cancel the event.
JavaScript:
| <script type="text/javascript"> |
| function OnClientItemClicking(sender, args) { |
| args.set_cancel(true); |
| } |
| </script> |
Thanks,
Princy.
0
bill
Top achievements
Rank 1
answered on 12 Apr 2010, 04:28 PM
Thank you for your resopnse. How would I attach the RadPanelBar to the javascript function?
0
Princy
Top achievements
Rank 2
answered on 13 Apr 2010, 08:39 AM
Hello Bill,
You could simply assign the name of the javascript function as the value of the the corresponding RadPanelBar property.
ASPX:
Regards,
Princy.
You could simply assign the name of the javascript function as the value of the the corresponding RadPanelBar property.
ASPX:
| <telerik:RadPanelBar ID="RadPanelBar1" runat="server" OnClientItemClicking="OnClientItemClicking" > |
| ... |
| </telerik:RadPanelBar> |
Regards,
Princy.
0
bill
Top achievements
Rank 1
answered on 13 Apr 2010, 03:37 PM