checkbox

3 posts, 1 answers
  1. Sigma
    Sigma avatar
    87 posts
    Member since:
    Apr 2012

    Posted 28 Aug 2012 Link to this post

    hiii,
    I want to show checkboxes only for child nodes of a radtreeview that is I want to hide checkboxes for parent nodes,how i can do that?


    regards
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Aug 2012 Link to this post

    Hi Sigma,

    Try the following code snippet to achieve your scenario.

    JS:
    <script type="text/javascript">
        function Unclehood(sender, args) {
            var item = sender.get_nodes();
            for (var i = 0; i < item.get_count(); i++) {
                var node = item.getNode(i);
                if (node.get_level() == 0) {
                    node.set_checkable(false);
                }
            }
        }
    </script>

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sri
    Sri avatar
    2 posts
    Member since:
    Oct 2016

    Posted 14 Nov in reply to Princy Link to this post

     .CheckboxTemplate("# if (item.level() > 0) { #" +
                    "<input type='checkbox' #= item.checked ? 'checked' : '' #>" +
                "# } #")
Back to Top