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

TreeView Checkbox display problem

1 Answer 23 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.
lu
Top achievements
Rank 1
lu asked on 01 Jul 2011, 02:58 AM
Problem:
It seems that TreeView's public function 'nodeCheck' doesn't work well.
In this function,there is a line which will set 'checked' and 'value' attributes' value of the checkbox,when variable 'isChecked' is true,everything is ok.On the contrary, I got the wrong attributes' value,and checkbox display status is checked.
$checkboxHolder.find(':checkbox').attr({
checked:isChecked?'checked':'',
value:isChecked
});
Then I google it and fixed it.Here is the code:
$checkboxHolder.find(':checkbox').attr('checked',isChecked).attr('value',isChecked);

Though I figured it out, I don't know why this happened.
Anybody help???

1 Answer, 1 is accepted

Sort by
0
bengu
Top achievements
Rank 1
answered on 08 Jul 2011, 02:14 PM
Thank you for the solution.I also faced this problem and your recommendation works for me.
Tags
TreeView
Asked by
lu
Top achievements
Rank 1
Answers by
bengu
Top achievements
Rank 1
Share this question
or