xmldatasource show gif in menu

2 posts, 1 answers
  1. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 11 Apr 2008 Link to this post

    It binds - but the image doesn't show on the left of the text


    xml version="1.0" encoding="utf-8" ?>




    Item Text="create" Url="~/Create.aspx" ImageUrl="~/App_Themes/Default/images/Images/create-menu.gif">




    telerik:RadMenu ID="RadMenu1" runat="server" Skin="Default2006"

    DataSourceID="XmlDataSource1" DataTextField="Text"

    DataNavigateUrlField="Url" Width="952">


    CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>


  2. Answer
    Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 14 Apr 2008 Link to this post

    Hello Jomey,

    The ImageUrl property is not automatically populated when binding to XmlDataSource. You need to add a "binding" to hint RadMenu which XML attribute provides data for the ImageUrl property. Please check the following online example:


    In your case you should add the binding like this:

    <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Default2006"  
    DataSourceID="XmlDataSource1" DataTextField="Text" DataNavigateUrlField="Url" > 
            <telerik:RadMenuItemBinding ImageUrlField="ImageUrl"  /> 

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top