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

Panel bar size in RadPane in RadSplitter

1 Answer 63 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Andrew Currie
Top achievements
Rank 1
Andrew Currie asked on 19 Dec 2011, 12:35 PM
Hi,

I have a RadPanelBar in a RadPane which is part of a Rad Splitter.  I have one vertical splitter, thus one left pane and one right pane.  The panel bar is in the left pane and should resize to maintain the width of the left pane as the left pane resizes.

In my attempt to accomplish this, I have caught the OnClientBeforeResize event on the RadPane.  I then set the width of the PanelBar accordingly.  I have used the http://www.telerik.com/help/aspnet-ajax/panelbar-resize-to-the-width-of-the-widest-radpanelitem.html for guidance.  I try to retrieve the current width of the bar then add the value from args.get_delta() on the BeforeResize event but I am not getting any joy here since panelBar.width() returns null and panelbar.width(500) (for example) simply doesn't resize the bar.

This is in IE8 and I notice that the documentation guidance linked to above specifically tests for IE6 and IE7.

Please help!

Thanks

function RadPaneMainNavigation_OnClientBeforeResize(sender, Args) {
    alert(Args.get_delta());
    var panel = $telerik.$("<%= PanelBarNavigation.ClientID %>");
    alert(panel.width());
    panel.width(500);
}

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 21 Dec 2011, 12:47 PM
Hello Andrew,

In case anyone needs an answer for this question I will paste the answer of the support ticket that you send us (containing the same question) here as well:
 
To set the the width of the RadPanelBar control using client-side you could find the panelbar first and the use the following properties:
var pb = $find("<%= PanelBarNavigation.ClientID %>");
//setting width of the PanelBar
pb.get_element().style.width = "600px";

Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
PanelBar
Asked by
Andrew Currie
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or