Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1035
WebDataMenu with only image buttons (no text)?
posted

I am having trouble trying to use WebDataMenu as a toolbar. I just want a simple toolbar with ONLY image buttons (with no text on the buttons). Anyone have a sample of how to do this? It was possible with the old WebToolbar. This should be simple, correct? What am I doing wrong? Please help!!!

I can not even find an example of how to do this on the on the Samples page (http://samples.infragistics.com/aspnet/Samples/WebDataMenu/Display/VerticalMenu/Default.aspx?cn=data-menu&sid=1b19ba76-eb5b-41e7-b757-716fdb9fbc35).

The control will not let you set Text="" on it.  You must have at least a space.

Here is my attempt:

 <ig:WebDataMenu ID="UWTB_Legend" runat="server" Height="22px"
            EnableScrolling="False">
            <Items>
                <ig:DataMenuItem ImageToolTip="MoveUp" ImageUrl="~/images/Up.gif" Text=" "
                    ToolTip="Move Up" Key="MoveUp">
                </ig:DataMenuItem>
                <ig:DataMenuItem ImageToolTip="MoveDown" ImageUrl="~/images/Down.gif" Text=" "
                    ToolTip="Move Down" Key="MoveDown">
                </ig:DataMenuItem>
            </Items>
            <ClientEvents ItemClick="onUpDownButton" />
        </ig:WebDataMenu>

Parents
No Data
Reply
  • 3115
    Offline posted

    Hi jonnydock ,

    Can you tell us what's not working with your sample? I've copy/pasted your code, set the group settings

    <

     

     

    GroupSettings Orientation="Horizontal" />

     

     

     

       and remove from the code Text=" "

    If you are following the link to the samples you've provided, there you are databinding to the menu items and when textValue is not bond by design it's set to "Menu". There are a couple of changes to the sample you need to do to accomplish the task you want.

    1. GroupSettings set the orientation to Horizontal

    2. remove all the properties you don't need from the "DataMenuItemBinding"

    3. You need to hook to ItemBound event and set the text to an empty string

        5     protected void Page_Load(object sender, EventArgs e)

        6     {

        7         this.WebDataMenu1.ItemBound += new Infragistics.Web.UI.NavigationControls.DataMenuItemEventHandler(WebDataMenu1_ItemBound);

        8         this.MenuDataSource.DataBind();

        9     }

       10 

       11     void WebDataMenu1_ItemBound(object sender, Infragistics.Web.UI.NavigationControls.DataMenuItemEventArgs e)

       12     {

       13         e.Item.Text = "";

       14     }

    Hope that helps,

    Thanks 

Children