Page 1 of 1

treeview : uncheck/check on parent node not reflect on child

Posted: Thu May 15, 2008 6:40 am
by nitin
Hi Ranorex Team,

I have a treeview control but when i make uncheck using
'UnCheckItem' method it only uncheck that node and child node
keep as it is ( not unchecking )
int isUncheck = treeView1.UncheckItem(itemPos);

so how can i handle this? (i can do this by selecting each sub-node but there are too many child)

Thanks
Nitin

uncheck/check on parent node not reflect on child

Posted: Thu May 15, 2008 6:50 am
by nitin
Hi Ranorex Team,

Is any different between
'Unchecking' using Mouse and using 'UnCheckItem' method

becouse using recorder its work properly.


Thanks,
Nitin

Posted: Thu May 15, 2008 10:35 am
by Support Team
Hi Nitin,

yes, there is a difference between clicking with the mouse and using the UncheckItem method as you already noted. When clicking with the mouse, controls may react to that click in an event handler and do some additional actions (like unchecking all its child items). If you use the UncheckItem method, the internal treeview will be instructed to uncheck the item, but the additional actions might not be executed.

That's why it is usually safer and more real-user-like to click with the mouse than using the UncheckItem method.

Regards,
Alex
Ranorex Support Team