Dear Team
I am trying to migrate an old application which uses Infragistics 2011 controls to the new version. Therefore I have to migrate the old menu controls to the new WebDataMenu. Unfortunately, the old tag property that could be used for the MenuItems has not been replaced by an alternative.
I need to pass some additions information to the Client. As the DataItem property is not written to the HTML stream, I tried the Attributes collection, which, according to the documentation, is written to the HTML stream. But in reality it isn't. at least I don't see the data tag in the resulting HTML:
DataMenuItem item = new DataMenuItem();item.Attributes.Add("data-tag", tag);
Which leaves me with the only (but really ugly) Workaround to set the ToolTip (which will be rendered as a Title tag) or as a CSS class.
Is it really true that there is no other way?
Kevin
Hello Kevin,
The approach you are using should work just fine. I've attached a small sample where I verified this works.
To determine why this isn't working for you could you please provide me with the build number you are using for the Infragistics controls along with what sort of item the tag entry would be?
Hi Jason,
Thanks a lot, I think I found the issue:
I found out, that after the Initial page load, the attributes are present in my HTML. However, after a postback (ViewState is enabled), the menu is still appearing, but the attributes seem to be lost. So it Looks like as if the attributes are not being stored in the ViewState - is that right? Is there any way to include that?
Thanks a lot