I have webdatamenu in that i have added 5 buttons through loop using itemplate but can't access key or value of those buttons on itemclick event.
Hello cmm,
I was able to reproduce this issue, but I need to do some research to find out how to get access to these controls. I should be able to update you by Thursday.
Due to the ASP.NET page life-cycle, it's not possible to access the controls during that event because they have not been reinstantiated yet. What I suggest doing is having a variable in the page class that you set during the event. Then at a later event, you can retrieve the controls.
I've attached a sample to show you an example of this. You may need to change the assembly versions in the sample to match your installed version. If you need any help doing this please let me know.
Please let me know if you have any further questions.
Please let me know if you need further assistance with this issue.
I'm not sure I understand your setup in that case. Could you please provide a sample or post some code snippets to help me understand your setup better? Could you also tell me if your issue is with accessing the buttons is in the server-side or client-side ItemClick event?
If you are trying to access them in the server-side event, you will have to wait until a later event for the buttons to be created. This is due to the ASP.NET page life-cycle which you can find more about on MSDN here:http://msdn.microsoft.com/en-us/library/ms178472.aspxPlease note this site is not owned or maintained by Infragistics.
Please let me know if you have any questions or concerns.
Hello,
Thanks for your reply.got some help from your example but my problem is that i have added buttons in ButtonTemplate class through a loop and all buttons have different text so i can't access those buttons on WebDataMenu1_OnItemClick event.