This is a migrated thread and some comments may be shown as answers.

Scrolling in GridView causes checkbox events to fire

3 Answers 224 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian
Top achievements
Rank 1
Brian asked on 28 Feb 2012, 10:19 PM

We have a GridView control which contains some checkboxes in each row of the grid.  When we scroll the grid, the Check_Changed event of the checkboxes gets fired.  This is causing major issues with our code as we actually want to do some action when those checkboxes are legitimately changed. 

I have put together a sample project.  I was not able to attach it here so you can grab it from: www.crooknecksolutions.com/RadGridView_Sample.zip 

Put a breakpoint on the 'CheckBox_CheckedChanged' event handler in the MainPage.xaml.cs file and run the project.  When the grid opens, scroll and you will see the breakpoint being hit.  This certainly seems like a bug.

Is there something we can do differently so this event is not being fired?
Tks.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Feb 2012, 08:24 AM
Hi,

 We believe that you will get exactly the same behavior with standard Silverlight DataGrid, ListBox and/or any other UI virtual component. You can check the attached project for reference. 

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Brian
Top achievements
Rank 1
answered on 29 Feb 2012, 04:07 PM
Sure enough.  Very surprised by this unexpected behavior.  I guess you can pass the buck on to Silverlight itself.  Now both controls have what I would consider to be a bug.
0
Vlad
Telerik team
answered on 29 Feb 2012, 04:09 PM
Hello,

 This is how UI virtualization works in both platforms (Silverlight and WPF). You can check MSDN for more info.

Regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Brian
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Brian
Top achievements
Rank 1
Share this question
or