DataForm commits when focus lost

2 posts, 0 answers
  1. Art Kedzierski
    Art Kedzierski avatar
    107 posts
    Member since:
    Nov 2009

    Posted 07 Oct 2013 Link to this post

    I have a RadDataForm synced with a RadGridView. I have AutoCommit=False set on the form, yet when I click away from the form onto the grid, the data commits. What's the correct way to prevent committing the dataform when it loses focus? Am I missing a commit setting on the GridView? To complicate issues, I have another GridView embedded in the dataform so I can't simply check if the primary GridView has focus (like so):

    public void Device_LostFocus(object sender, RoutedEventArgs e)
        if (FocusManager.GetFocusedElement() is RadGridView)
            (sender as RadDataForm).CancelEdit();
  2. Ivan Ivanov
    Ivan Ivanov avatar
    1116 posts

    Posted 08 Oct 2013 Link to this post


    What do you mean by mentioning "commit" - committing the value of  a single editor, or committing the whole edit operation in the scope of RadDataForm? Since RadDataForm relies on data binding and it is the standard behavior of the vast majority of editors, to update their value binding as soon as they lose focus, you can do very little about changing this. The AutoCommit=false feature just blocks the UI, in order to oblige the user to confirm or cancel the pending input. In case it is canceled, changes are reverted.

    Ivan Ivanov
    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 R3 2016 release webinar banner
Back to Top