Checkbox Failing to Stay Checked

2 posts, 0 answers
  1. Brian
    Brian avatar
    3 posts
    Member since:
    Feb 2013

    Posted 31 Jul 2013 Link to this post

    We've got a datagrid that is using a checkbox in the header of a column to act as switch to "Select All" or "Unselect All". There's a problem with it that it works ok for a while but then after swapping the page in and out the checkbox stops working. What we actually see is that it starts out empty, the user clicks on it and the "checked" event fires immediately followed by the "unchecked" event and so the user can never actually get the checkbox to stay checked. 

    The checked and unchecked event handler looks fine and we don't have code that sets the checkbox in anyway, so it's quite puzzling why this could be happening. 

    To make things more interesting, the behavior only happens when we're NOT debugging. So, if we enter the same code while in debug mode, the bug doesn't happen. 

    So, a few questions....

    1. What's the best way to see all of the event handlers that have been stacked up on the checked and unchecked events? 
    2. Does the checkbox or the gridview that we're using have any code that might be different in debug vs. non-debug modes?
    3. Are there scenarios when the checkbox would immediately revert itself? For instance, if there is an error in a handler for the checkbox "checked" event, would the checkbox immediately revert itself back to "unchecked" and also call the "unchecked" event handler?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 05 Aug 2013 Link to this post

    Hi,

    Do you use the GridViewSelectColumn or have you defined your own custom column to handle the multiple selection? If it is the second option, then have you tried using the GridViewSelectColumn? If you have to use your custom column, then would you please share some code snippets on your logic?

    You say that the problem occurs after swapping the page in and out., would you please share a little bit more details on how have you implemented the paging? Does the issue also appears if you comment all the code you execute when the "Checked" and "Unchecked" events are raised? 

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top