I am exploring the WebDataMenu and I would like to implement CheckBox as a menu option using <Templates>. I was able to get the CheckBox to display alongwith other DataMenuItem(s). However, the CheckBox is not checked when clicked. I would like to also control individual postback(s) depending on the item that is clicked and implement the server event OnCheckedChanged of the CheckBox. I would appreciate any inputs!
Here is my html markup -
Hi,
I've tried your code it looks almost correct.
You have to set Checked="false" in the <asp:CheckBox ... />
and you have to set ItemClick="On" to <AutoPostBackFlags ItemClick="Off" /> because you have configured the asp:CheckBox to do auto postback using AutoPostBack="true".
The problem is that when auto postback for ItemClick is "On" the item click event triggers a full page postback and the asp:CheckBox may have not processed the mouseclick browser event that is why it never gets checked. So I suggest to put it to Off.
Hope this helps.
Thanks,
Lubomir