Ok so this menu control is doing wacky things out of the box.... I hope that I'm doing something wrong here.Just to keep things simple, I have an asp.net 3.5 web site with nothing but a WebDataMenu in it. The menu's using the default style. My problem is after a postback, I get some strange behavior. In IE8, when I return from the post and hover over the item that was previously clicked, the highlight is gone. If I move off of the menu and come back it's all good. In firefox, if I perform the same steps, the item clicked stays highlighted. Is there something I'm supposed to do in order for this to work correctly after a postback?
I'm using 2010.1 with the latest service release.
Here's my sample code for default.aspx: ("ItemClick" doesn't need to do anything)
<body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <ig:WebDataMenu ID="WebDataMenu1" runat="server" OnItemClick="ItemClick" > <Items> <ig:DataMenuItem Text="Parent" > <Items> <ig:DataMenuItem Text="Child" /> </Items> </ig:DataMenuItem> </Items> </ig:WebDataMenu> </div> </form></body>
Hello,
You should be able to set the item as selected by setting the Selected property as true in the DataMenuItemEventArgs parameter object. In Firefox this property seems to be set as true however in IE8 it's set to false so you can add the following line in the server side event that is handling OnItemClick:
e.Item.Selected = true;
Let me know if this works for you.
Sincerely,Duane HoytDeveloper Support EngineerInfragisticshttp://es.infragistics.com/support
Hey Duane, thanks for the reply.
I was actually not trying to get the node to stay highlighted as I was showing in firefox. I was just using the two examples to illustrate that the control was not working properlly out of the box. The actual problem that I'm having in my application is a little different. When a child menu item is clicked and a post back occurs, the same menu item will disappears when I try and hover over it after the post back.
Try my previous example with three child nodes. Click on "Child2" then hover over "Child2" after the post returns.
<ig:DataMenuItem Text="Child" />
<ig:DataMenuItem Text="Child1" />
<ig:DataMenuItem Text="Child2" />
Also just fyi, I don't particularity care about firefox... I mostly need this to work in ie.