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

radpanelbar - URGENT HELP NEEDED

3 Answers 58 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Abdul Kadar
Top achievements
Rank 1
Abdul Kadar asked on 08 Jan 2010, 12:43 PM
Hi
I need to set the image for the panelbar items at runtime .how can i do this ? I tried the code . but it not works to me.Pls review my code and let me know how to resolve this problem.I need to set the imageurl from the sqldatasource imageurl field ( I M USING VB CODE IN CODEBEHIND )

 

<telerik:RadPanelBar ID="RadPanelBar1" runat="server"
DataFieldID="MENUCODE"
DataFieldParentID="PARENTID"
DataSourceID="SqlDataSource1"

 

 

DataTextField="MENUDESCRIPTION"
DataValueField="MENUDESCRIPTION" 
ExpandMode="FullExpandedItem"
DataNavigateUrlField="NAVIGATEURL">

 

 

</telerik:RadPanelBar>

 

asp

 

:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TrackConnectionString %>"

 

 

 

 

 

SelectCommand="SELECT MENUCODE, MENUDESCRIPTION, PARENTID, COMPANYID, NAVIGATEURL FROM MENUTABLE"

 

 

 

 

 

 

</asp:SqlDataSource>

 

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 08 Jan 2010, 04:27 PM
Hi Abdul Kadar,

You should set the images of items in ItemDataBound event handler as it's explained here.

Kind regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Abdul Kadar
Top achievements
Rank 1
answered on 09 Jan 2010, 06:58 AM
Thanks for your reply.I m beginner in Telerik.That code doesn't works for me
I need to set the imagepath as specified in the sql table data (imageurl)
Can you pls explain it in complete code (vb).Pls look at my code. The field imageurl in sqldatasource is there.I need to set this value as my path for radpanelbar image url.Pls help me


<
telerik:RadPanelBar ID="RadPanelBar1" runat="server"
DataFieldID="MENUCODE" DataFieldParentID="PARENTID" DataSourceID="SqlDataSource1" DataTextField="MENUDESCRIPTION"
DataValueField="MENUDESCRIPTION" ExpandMode="FullExpandedItem" DataNavigateUrlField="NAVIGATEURL">

</telerik:RadPanelBar>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TrackConnectionString %>"

 SelectCommand="SELECT MENUCODE, MENUDESCRIPTION, PARENTID, COMPANYID, NAVIGATEURL,IMAGEURL FROM MENUTABLE"

</asp:SqlDataSource>

 

 

Reply

0
Simon
Telerik team
answered on 10 Jan 2010, 03:38 PM
Hello Abdul Kadar,

Please see this post for the solution.

Best wishes,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
PanelBar
Asked by
Abdul Kadar
Top achievements
Rank 1
Answers by
Yana
Telerik team
Abdul Kadar
Top achievements
Rank 1
Simon
Telerik team
Share this question
or