I cannot figure out how to get the WebDataMenu javascript Infragistics object. With WebToolbar there was a "igtbar_getToolbarById" function. I also have been unsuccessful using "$find("<% =WebDataMenu1.ClientID %>")". I was able to get an object using "document.getElementById("<% =UWTB_Main.ClientID %>")", but I did not see the "getItems" function described in the documentation at http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Web_WebDataMenu.html
Hi jonnydock,
Thank you for posting in the community.
WebDataMenu should be accessible through "$find("<%= WebDataMenu1.ClientID %>")" and also through the ig_controls object - for instance using ig_controls.WebDataMenu1 . Attached is a small sample illustrating these approaches of accessing the clientside menu object (in order to check the number of items currently in the menu).
Please let me know if this helps.
Please feel free to contact me if you are still experiencing any issues with this matter.
I am able to run the example that you provided with no problem, and both buttons work correctly. But, when I try those same calls in my web application, "$find" returns "undefined" and "ig_controls" does not list any of the controls under it. Do you have any idea why it is not working correctly?
I am currently running version 2011.2 and porting my application from version 2011.1.
Thank you for your reply.
In this scenario I would suggest handling the menu's Initialize clientside event and persisting the sender argument in a javascript variable which should allow you to access the object later at will.
That worked! Thanks for your help!
Hello jonnydock,
Please feel free to contact me if you are still experiencing issues with accessing the WebDataMenu on the client.