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

Class library usage, coding and language questions.
nitin
Posts: 8
Joined: Thu Nov 09, 2006 5:56 am
Contact:

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

Post by nitin » Thu May 15, 2008 6:40 am

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

nitin
Posts: 8
Joined: Thu Nov 09, 2006 5:56 am
Contact:

uncheck/check on parent node not reflect on child

Post by nitin » Thu May 15, 2008 6:50 am

Hi Ranorex Team,

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

becouse using recorder its work properly.


Thanks,
Nitin

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Thu May 15, 2008 10:35 am

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