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

DataForm commits when focus lost

1 Answer 63 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Art Kedzierski
Top achievements
Rank 2
Art Kedzierski asked on 07 Oct 2013, 02:47 PM
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();
        Refresh_Devices();
    }
}

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 08 Oct 2013, 06:09 AM
Hi,

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.

Regards,
Ivan Ivanov
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 >>
Tags
DataForm
Asked by
Art Kedzierski
Top achievements
Rank 2
Answers by
Ivan Ivanov
Telerik team
Share this question
or