This is a migrated thread and some comments may be shown as answers.

Checkboxes Not Being Rendered When Loading Nodes On Demand

1 Answer 46 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin Watkins
Top achievements
Rank 1
Kevin Watkins asked on 11 Apr 2010, 04:46 PM
Hi,

If you load nodes on demand in a tree that has ShowCheckBox(true) then the newly loaded nodes aren't rendered with checkboxes. To fix edit telerik.treeview.js:

  1. Line 250, change:

    $t.treeview.getGroupHtml(data, groupHtml,
    this.isAjax(), $item.hasClass('t-treeview'));

    to

    $t.treeview.getGroupHtml(data, groupHtml,
    this.isAjax(), $item.hasClass('t-treeview'), this.showCheckBox);
  2. Line 492, change:

    getGroupHtml:

    function(data, html, isAjax, isFirstLevel) {

     


    to

    getGroupHtml:

    function(data, html, isAjax, isFirstLevel, showCheckBox) {

  3. Line 523, change:

     

    if

     

    (this.ShowCheckBox)

    to

     

    if

     

    (showCheckBox)

     

  4. Line 544, change:

    this

     

    .getGroupHtml(item.Items, html, isAjax, false);

     


    to

    this

     

    .getGroupHtml(item.Items, html, isAjax, false, showCheckBox);


Cheers,

Kev

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 12 Apr 2010, 02:16 PM
Hello Kevin,

Thank you for sharing the fix. I've included it in our code, so the fix will be available with upcoming releases. Your Telerik points have been updated.

All the best,
Alex Gyoshev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TreeView
Asked by
Kevin Watkins
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or