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

How to load imageurl from database field

1 Answer 62 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bharat
Top achievements
Rank 1
Bharat asked on 10 Dec 2011, 03:09 PM
Hi,

How to load imageurl from database field for tree view?
as my data for tree view is comming from database table where in i m having imageurl as well

Regards!

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 12 Dec 2011, 05:04 PM
Hello Bharat,

You could take advantage of the templates for RadTreeView. Here's an example:

<telerik:RadTreeView
    DataSourceID="SqlDataSource1"
    DataFieldID="ItemID"
    DataFieldParentID="ItemParentID"
    DataTextField="ItemText"
    ID="RadTreeView1" runat="server">
    <NodeTemplate>
        <img alt="" height="74" src='<%# Eval("ItemImageUrl") %>' width="73" />
        <asp:Label Text='<%# Eval("ItemText") %>' runat="server" />
    </NodeTemplate>
</telerik:RadTreeView>

You can read more about the templates and how to use them here. Greetings,
Bozhidar
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
TreeView
Asked by
Bharat
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or