CheckState.Checked ??

Ask general questions here.
Posts: 23
Joined: Wed Oct 06, 2010 8:21 pm

CheckState.Checked ??

Post by chunkylover53 » Tue Jan 11, 2011 11:29 pm

I'm using Ranorex version and am running into a problem with checkboxes.
I have a custom gridview control that is filled with checkboxes. I use the code below to iterate through the checkboxes and set the check state. However the it keeps randomly failing with an "operation not supported" message.
I see no reason for it to fail on any of the checkboxes. Does anybody have any suggestions?

foreach(Ranorex.CheckBox box in list)

fail = false;
Report.Error("checked boxes found");
return fail;

box.CheckState = CheckState.Checked;


User avatar
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: CheckState.Checked ??

Post by Ciege » Tue Jan 11, 2011 11:50 pm

Obligatory, obvious question... Does each checkbox have a valid checked and checkstate property?

Wrap your code in a try/catch and catch the full exception to see what is happening.

Possibly the checkbox is of state indeterminate and the Ranorex checkbox is not liking getting set to indeterminate?

Just some shots in the dark here....
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!


User avatar
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark

Re: CheckState.Checked ??

Post by artur_gadomski » Wed Jan 12, 2011 7:38 am

Maybe some of them are disabled and setting CheckState is not supported on them?
Maybe the list contains elements other than Checkboxes?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12174
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: CheckState.Checked ??

Post by Support Team » Wed Jan 12, 2011 1:39 pm

artur_gadomski wrote:Maybe some of them are disabled and setting CheckState is not supported on them?
This is also my guess.

Anyway, can you please send us a snapshot of your application under test.
Therefore, please take a look to following link: ... html#c2072
Or, even better, can you send us a sample application with this behaviour.
This will make it much easier to determine your issue.

You can either reply on this post with the attached files or send us the files to [email protected].

Kind regards,
Support Team