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

RadPanelBar Expand Behavior

6 Answers 116 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Sergio Cortez
Top achievements
Rank 2
Sergio Cortez asked on 30 Mar 2009, 06:09 PM
HI Everyone.
I have been working with the RadPanelBar as the left Navigation Control Replacing the default ASP:Menu.

Everything is working fine but i have a little doubt about the expand behavior of the RadPanelBar.

Is there a way to click the arrow to make the expand animation go on and off   BUT  without redirecting the page.

and unless the user clicks the header of the panelbar then go and redirect to the selected page.

Thank very much i appreciate any help, tip or trick.


Sergio

6 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 31 Mar 2009, 11:10 AM
Hello Sergio,

Please refer to this KB article for details on the matter.

Kind regards,
Paul
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Sergio Cortez
Top achievements
Rank 2
answered on 31 Mar 2009, 08:56 PM
Hi Paul thank you very much for your help.
i have red the article and its great its exactly what i want to do.
But i have more question, sorry.

The article sais that i need to is to modify  ImageUrl and ExpandedImageUrl Property in the RadPanelItem
But the problem is that i am not defining any RadPanelItem for my PanelBar because im using a custom navigation provider wich build the entire PanelBar at runtime.

So i only have this line
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" DataSourceID="MyNaviProvider"
 Skin="MySkin" EnableEmbeddedSkins="False" OnClientItemClicking="onClicking"  />
                                    

What should i do?

Thank you for the support
 
0
Sergio Cortez
Top achievements
Rank 2
answered on 01 Apr 2009, 01:31 AM
Hi Paul. I've been working with the radpanelbar and the examples that comes with the KB article.
Right now i think im really near to get this thing do its work.

I have a question , hope you can help me.

what does exactly this IF do?

 if (target == eventArgs.get_item().get_imageElement())
{
}


Appreciate your help
0
Accepted
Paul
Telerik team
answered on 01 Apr 2009, 01:15 PM
Hello Sergio,

This is needed for checking if the click comes from the RadPanelItem image (defined via the ImageUrl property).

Sincerely yours,
Paul
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Sergio Cortez
Top achievements
Rank 2
answered on 01 Apr 2009, 06:15 PM
Hi Paul. Me again :p
Well as i need to set the ImageUrl Property to each item so the javascript code can work properly i decided to use the event OnItemDataBinding

protected void RadPanel_OnItemDatabound(object sender, RadPanelBarEventArgs e)
    {
        if (e.Item.Items .Count >0)
        {
            e.Item.ImageUrl = "arrow-right.gif";
            e.Item.ExpandedImageUrl = "arrow-down.gif";
        }
    }

but im running into problems because its placing an arrow to every element in the panelbar
i have added this conditon if (e.Item.Items .Count >0) so it only places the image to items that has childs.

sadly there is no property like e.Items.HasChildren()             :(
Thanks




0
Sergio Cortez
Top achievements
Rank 2
answered on 06 Apr 2009, 02:03 PM
the answer is to use e.Item.Items .Count >0 but in the Databound event and not in the itemdatabound.

thank you
Tags
Sharepoint Integration
Asked by
Sergio Cortez
Top achievements
Rank 2
Answers by
Paul
Telerik team
Sergio Cortez
Top achievements
Rank 2
Share this question
or