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

ImageUrl datatable bind

1 Answer 65 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 1
Jacques asked on 12 Jan 2015, 04:01 PM
Hi there,

I am able to bind a datatable to a radmenu.

I want to show images to the rad items and use a column in the datatable for this.
I cannot find the right property to the radmenu.

Anybody any idea??


Regards,

Marcel


1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 13 Jan 2015, 12:54 PM
Hello Marcel,

You can add images to a RadMenuItem by setting the path to the image's location in the ImageUrl property:

<telerik:RadMenuItem ImageUrl="Images/MyImage.png"></telerik:RadMenuItem>

There are other properties that you set if you want the image to show up when the user performs specific action: hover, click, etc. You can find them in the Adding Images to Items section of our documentation.
You can then use the ItemDataBound event handler to bind the property to a data item field. Alternatively you can use the DataBindings collection. Please, see the Using DataBindings article in our documentation for more info on the DataBindings collection and we also have a demo, which shows it in action:

Regards,
Ivan Danchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Menu
Asked by
Jacques
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or