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

How to change Imageurl of a pannelbar at runtime

2 Answers 81 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Jidesh Guptha
Top achievements
Rank 1
Jidesh Guptha asked on 10 Jun 2009, 11:08 AM
Hi,

I change the Theme of the radcontrols dynamically at the runtime. I also want to change the images of the pannel bar.
Pls. guide me how to change the image in the pannel bar dynamically.

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 Jun 2009, 12:10 PM
Hi Jidesh,

Try the following code for changing the ImageUrl property of panel item from code behind.

CS:
 
protected void Button1_Click(object sender, EventArgs e) 
    RadPanelBar1.FindItemByText("Root RadPanelItem2").ImageUrl = "../Images/Image1.gif"
Checkout the demo which illustrates the feature:
Text with Icons

Feel free to share the comments.
-Shinu.
0
Jidesh Guptha
Top achievements
Rank 1
answered on 10 Jun 2009, 01:00 PM

I Got it.
added the code like the below in the codebehind

 

RadPanelBar.FindItemByValue(

"Rad_Panel_Item_Name").ImageUrl = "../Imagepath";

 

Tags
PanelBar
Asked by
Jidesh Guptha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jidesh Guptha
Top achievements
Rank 1
Share this question
or