Lost ChecBoxColumn Data on leave focus

6 posts, 0 answers
  1. Omesis
    Omesis avatar
    3 posts
    Member since:
    May 2008

    Posted 30 May 2008 Link to this post

    Hi i have a problem, im using a RadGridView for windows, i have a CheckBoxColumn in editable mode, but when the RadGridView lost the focus, latest changes in the checkbox are lost.
  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 02 Jun 2008 Link to this post

    Hi Alejandro,

    We are aware of this issue and have planned to address it for the upcoming Q2 release. For now, you could try handling the LostFocus event of RadGridView as shown below:

    void radGridView1_LostFocus(object sender, EventArgs e) 
            { 
                if (this.radGridView1.ActiveEditor is RadCheckBoxEditor) 
                { 
                    this.radGridView1.EndEdit(); 
                } 
            } 

    I hope this helps. If you have any further questions, please contact me.

    All the best,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Joel
    Joel avatar
    3 posts
    Member since:
    Nov 2006

    Posted 02 Jun 2008 Link to this post

    Thanks, but i have tried with this option and the latest changes in the checkbox are lost too.
  5. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 03 Jun 2008 Link to this post

    Hi Signus,

    I tested the same code and it seemed to work. What version are you using? I tested the code with the Q1 2008 SP1 release of RadControls for WinForms.

    Could you share more details about the scenario? Why is the grid view losing focus in your scenario: is another form/window or another control in the same form focused?

    I'm looking forward to your response.

    Greetings,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Michael
    Michael avatar
    1 posts
    Member since:
    Feb 2008

    Posted 23 Jun 2008 Link to this post

    I am having the same problem.  When I check the checkbox the box becomes check/unchecked as appropriate.  But unless I press Enter or check somewhere else in the grid the change is not saved.  If I check away from the grid control the value in the checkbox reverts to the value before the change.  I have tried using your suggested code in the "Leave" event (my radGridView doesn't expose a "LostFocus" event, do I have the correct version?  I have 1Q2008SP1 installed, the runtime version is v2.0.50727, the Version is 6.1.0.0) The endedit method is executed but the cahange does not take.

    Is there a way to capture the toggle of the GridViewCheckBoxColumn to post the change directly into the database in a "brute force" manner?

    There seems to be nothing to indicate to the user that some action beyond just checking the box is required.  If he has entered the grid just to toggle a checkbox the behavior is quite anomalous.
  7. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 25 Jun 2008 Link to this post

    Hello Michael,

    I tried the same code but with the Leave event I can confirm that it did not work. However when a workaround is used in the LostFocus handler it seems to work. RadGridView must expose LostFocus event as it is inherited from Control.
    Please, try handling the LostFocus event of RadGridView and if that does not solve the problem send us a simple project that we can use to investigate the issue locally.

    Best wishes,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for WinForms is Visual Studio 2017 Ready