All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
Menu
/
Check / Uncheck functionality in Menu.
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
2 posts, 0 answers
Dheeraj Khajuria
7 posts
Member since:
Jul 2009
Posted 23 Oct 2009
Link to this post
Can we have check boxes in menu and controll the check/uncheck actions in Java script? Actually we dont want to have post back for having check/uncheck functionality.
Shinu
17764 posts
Member since:
Mar 2007
Posted 26 Oct 2009
Link to this post
Hello Dheeraj,
You can add checkboxes in the ItemTemplate of the RadMenu. Here's an example:
aspx:
<
telerik:RadMenu
DataSourceID
=
"SqlDataSource1"
Flow
=
"Vertical"
ID
=
"RadMenu1"
runat
=
"server"
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"checkbox1"
runat
=
"server"
onclick
=
"checkboxclicked(this);"
/>
<
%#Eval("FirstName")%
>
</
ItemTemplate
>
</
telerik:RadMenu
>
js:
function
checkboxclicked(checkbox)
{
var
text = checkbox.nextSibling.nodeValue;
if
(checkbox.checked)
{
alert(
"Selected text is"
+ text);
}
else
{
alert(
"Unselected text is"
+ text);
}
}
Thanks
Shinu.
Back to Top
Close