Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > TreeView > Unable to deselect treeview check box when using jQuery 1.6.4

Not answered Unable to deselect treeview check box when using jQuery 1.6.4

Feed from this thread
  • Nick avatar

    Posted on Nov 16, 2011 (permalink)

    I'm currently using jQuery 1.6.4 and I have a tree view listing the provinces and territories in Canada and the states in the USA, with the two countries being the two top nodes and the provinces & states being child nodes. But I noticed when testing it that I can't deselect any of the check boxes once they've been checked (parent or child). If I remove my reference to jQuery 1.6.4 and let the call to the Telerik Script Registrar import 1.5.1 it seems to work fine. I've removed the layout from my view and eliminated all of my other script files to ensure I wasn't getting an unintended cross over behaviour it still has the same problem. I have been testing in Chrome but the same problem is present in IE9 and Firefox. Am I missing something or is this a bug?

    @model IList<Country>
    @{
        Layout = "";
        IList<State> states = (IList<State>)ViewData["selectedStates"];
    }
     
    <script src="@Url.Content("~/Scripts/jquery-1.6.4.min.js")" type="text/javascript"></script>
         
    @(Html.Telerik().StyleSheetRegistrar()
        .DefaultGroup(group => group.Add("telerik.common.css")
        .Add("telerik.default.css")))
     
    @(Html.Telerik().TreeView()
        .Name("RegionStates")
        .ShowCheckBox(true)
        .ExpandAll(true)
        .BindTo(Model.OrderBy(x=>x.Name), mappings =>
            {
                mappings.For<Country>(binding =>
                        binding.ItemDataBound((node, country) =>
                        {
                            node.Text = country.Name;
                            node.Value = country.CountryId.ToString();
                            node.Checked = country.States.All(x => states.Any(y => y.StateId == x.StateId));
                        })
                        .Children(country => country.States.OrderBy(x => x.Name).ToList()));
                mappings.For<State>(binding => binding.ItemDataBound((node, state) =>
                    {
                        node.Text = state.Name;
                        node.Value = state.StateId.ToString();
                        node.Checked = states.Any(x => x.StateId == state.StateId);
                    }));
            })
    )
     
    @Html.Telerik().ScriptRegistrar().jQuery(false)

    Reply

  • Dimo Dimo admin's avatar

    Posted on Nov 17, 2011 (permalink)

    Hi Nick,

    For proper jQuery 1.6.4 support, please upgrade to the Q3 2011 version of our MVC components.

    http://demos.telerik.com/aspnet-mvc/treeview/checkboxsupport

    All the best,
    Dimo
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > TreeView > Unable to deselect treeview check box when using jQuery 1.6.4
Related resources for "Unable to deselect treeview check box when using jQuery 1.6.4"

ASP.NET MVC TreeView Features  |  Documentation  |  Demos  |  Telerik TV ]