Checkboxes checked in Silverlight Datagrid are cleared.

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
sagargurao
Posts: 10
Joined: Mon May 16, 2016 7:49 am

Checkboxes checked in Silverlight Datagrid are cleared.

Post by sagargurao » Mon May 16, 2016 1:02 pm

Hello,

I have a web application running on silverlight which contains a datagrid and some checkboxes contained in it.
I have to check the checkboxes and then navigate the grid till the last row.

However, When I check some of the checkboxes using ranorex code and scroll down, the check boxes are automatically unchecked once they are not visible on the screen. Same behavior is not exhibited when the check boxes are checked manually and the grid is scrolled away.

Any help will be appreciated.

Thanks,
Sagar
Primary Key and Unique Key Checkboxes.jpg
Primary Key and Unique Key Checkboxes.jpg (332.81 KiB) Viewed 718 times
UniqueKeyCheckbox.rxsnp
(251.77 KiB) Downloaded 38 times

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Checkboxes checked in Silverlight Datagrid are cleared.

Post by krstcs » Tue May 17, 2016 2:39 pm

Please also include the code you are using to check the checkboxes. Without it, there isn't much anyone else can do.

If you are using a SetValue() method or similar invoke action methods, be aware that those types of methods do NOT FIRE EVENTS like a normal mouse click would. Basically, they do things behind the scenes to set the state of an object, but depending on how the object's events and listeners are coded, the events may not fire correctly.

It is almost always better to use Mouse.Click() and Key.Press() due to these issues.
Shortcuts usually aren't...

sagargurao
Posts: 10
Joined: Mon May 16, 2016 7:49 am

Re: Checkboxes checked in Silverlight Datagrid are cleared.

Post by sagargurao » Wed May 18, 2016 11:03 am

Thanks, this suggestion worked. :D
Earlier I was trying with checkbox.check() method and was getting this problem. However, after trying Mouse.MoveTo(checkbox) and Mouse.Click() methods it worked like a charm.

Thanks again.