Getting the itemid when checkbox is checked

hi every one,



Can anyone let me know, how to get the itemid when the tem checkbox is checked?



tree.setOnClickHandler(onNodeSelect);

tree.setOnCheckHandler(onNodeCheck);



I can get the selected item by invoking tree.getSelectedItemId() method , similarly how can i get the itemid when its checkbox is checked?


Hello,


you can use onCheck event. It gets id of checked item:


tree.attachEvent(“onCheck”,onNodeCheck);


function onNodeCheck(id,state){


alert("checked item is "+id);


return true


}