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

how to set panelbaritem icon dynamically

1 Answer 64 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Priya
Top achievements
Rank 1
Priya asked on 23 Dec 2008, 09:20 AM
sir,
I bound the panelbar in codebehind

 

 

Dim view As DataView = ds.Tables(0).DefaultView  
RadPlBMasterMenu.DataSource = view 
RadPlBMasterMenu.DataFieldID = "SYS_POLICY_ID" 
RadPlBMasterMenu.DataTextField = "SYS_POLICY_DESC" 
RadPlBMasterMenu.DataNavigateUrlField = "LINK_NAME" 
RadPlBMasterMenu.DataFieldParentID = "SYS_POLICY_PARENT" 
RadPlBMasterMenu.DataBind()  
 

i want to set icon to each panelbar item from codebehind

plz help me...

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 23 Dec 2008, 09:47 AM
Hello Priya,

I suggest you subscribe to OnItemDataBound event of RadPanelBar and set ImageUrl property to its items like this:

protected void RadComboBox1_ItemDataBound(object o,RadComboBoxItemEventArgs e)  
{  
 DataRowView dataSourceRow = (DataRowView) e.Item.DataItem;  
 e.Item.ImageUrl = dataSourceRow["Image"].ToString();  
}  

Hope this helps.

All the best,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
Priya
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or