Scrolling in GridView causes checkbox events to fire

4 posts, 0 answers
  1. Brian
    Brian avatar
    73 posts
    Member since:
    Sep 2010

    Posted 28 Feb 2012 Link to this post

    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.

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 29 Feb 2012 Link to this post

    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 >>
  3. Brian
    Brian avatar
    73 posts
    Member since:
    Sep 2010

    Posted 29 Feb 2012 Link to this post

    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.
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 29 Feb 2012 Link to this post

    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 >>
Back to Top