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
190
How to set a hover image for a webdatamenu with image items
posted

Hello,

I need to do a webdatamenu which items are images.

I can set the image of the item, but I wished the item to show another image when hovered

How to make this?

<ig:WebDataMenu ID="Menu" runat="server" EnableExpandOnClick="false" GroupSettings-Orientation="Horizontal" BackColor="#ebecee" 
BorderColor="#F0F0F0" BorderStyle="Outset" BorderWidth="3px" Height="95px" Width="100%" 
StyleSetName="Default">

<Items>


<ig:DataMenuItem Key="mnu_Inicio" NavigateUrl="~\." Text="" ToolTip="Inicio" ImageUrl="~\img\btn_home_off.jpg"/>


</Items>

</ig:WebDataMenu>

Thanks,

Claudio

WebForm1.rar
Parents
  • 18204
    Verified Answer
    Offline posted

    Hello Claudio,

     

    Thank you for posting in our forums!

    There is no built-in functionality to allow for this in the WebDataMenu.  There are some available workarounds to achieve this.

    One way is to set the image's src property during the ItemHovered and ItemUnhovered client events for the WebDataMenu.  For this you would want to use the following code for example:

    function WebDataMenu1_ItemUnhovered(sender, eventArgs)
    {
        //  Change the image to the idle image.
        eventArgs.getItem().get_anchorElement().firstChild.src = "/Images/item.gif";
    }
    function WebDataMenu1_ItemHovered(sender, eventArgs)
    {
        //  Change the image to the hover image.
        eventArgs.getItem().get_anchorElement().firstChild.src = "/Images/itemHover.gif";
    }

    Since the above is techincally a workaround, I would recommend submitting this as a product idea.  You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.

    I have found an existing product idea for this here:

    http://ideas.infragistics.com/forums/192360-asp-net/suggestions/5895877-add-a-property-to-the-webdatamenu-that-will-allow

    There are many benefits to submitting a product idea:

    - Direct communication with our product management team regarding your product idea.

    - Notifications whenever new information regarding your idea becomes available.

    - Ability to vote on your favorite product ideas to let us know which ones are the most important to you.  You will have ten votes for this and can change which ideas you are voting for at any time.

    - Allow you to shape the future of our products by requesting new controls and products altogether.

    - You and other developers can discuss existing product ideas with members of our Product Management team.

    Steps to create your idea:

    1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).

    2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)

    3. Add your product idea and be sure to be specific and provide as much detail as possible.  Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it.  You can even add screenshots to build a stronger case.  Remember that for your suggestion to be successful, you need other members of the community to vote for it.  Be convincing!

    The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.

    If you have any further questions or concerns with this, please let me know.

Reply Children
No Data