Telerik Extensions for ASP.NET MVC

Version Q1 2012, released 04/19/2012

CheckBox Support

  • Andrew Fuller
    • Nancy Davolio
    • Janet Leverling
    • Margaret Peacock
    • Steven Buchanan
      • Michael Suyama
      • Robert King
      • Anne Dodsworth
    • Laura Callahan

About this example ASPXRazor

Telerik TreeView for ASP.NET MVC supports checkbox items, as shown above.

If you want to enable the checkbox rendering, you can do so through the ShowCheckBox property

<%= Html.Telerik().TreeView()
         .Name("TreeView1")
         .ShowCheckBox(true)
%>

When the form is posted, the checked nodes will be posted to the server in a List<TreeViewItem>:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult ProcessCheckedNodes(List<TreeViewItem> TreeView1_checkedNodes)
{
    if (checkedNodes != null)
    {
        foreach (TreeViewItem node in checkedNodes)
        {
            // process checked node
        }
    }

    return View();
}

Get more than expected!

Take the Telerik Extensions for ASP.NET MVC to your Visual Studio projects to truly experience their power. Download your free copy now and jumpstart your development with the available learning resources.

The Extensions are offered in both open source and commercial versions the differences between which are well explained in the licensing FAQ.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Other Demos: