Hi Telerik Team,
is it planned that an updated Version of RadDataForm will expose a "DataError" event just like the RadDataGrid?
I am binding the RadDataForm to a customized Telerik.Windows.Data.QueryableCollectionView (overriding AddNew(), CommitNew(), CommitEdit(), etc.), which internally binds to a custom database repository-class. Everything works fine so far, but the DataForm fails to handle exceptions occuring after calling CommitEdit() or CommitNew(). E.g. RadDataForm calls CommitNew(), the repository tries to insert the new item into the db, then a "unique constraint" or other DB-error occurs, the dataform crashes. With DataGrid the approach works fine, as i subscribe the DataError event and handle the exception properly.
The only workaround now is, to catch the exception inside the CommitNew() / CommitEdit() method of the custom CollectionView() and call CancelNew() / CancelEdit() inside the catch-block. However this way the DataForm does not show an error to the user.
Using validation rules is no solution either, as some errors only occur when actually trying to insert / update an item in the database.
Best regards
is it planned that an updated Version of RadDataForm will expose a "DataError" event just like the RadDataGrid?
I am binding the RadDataForm to a customized Telerik.Windows.Data.QueryableCollectionView (overriding AddNew(), CommitNew(), CommitEdit(), etc.), which internally binds to a custom database repository-class. Everything works fine so far, but the DataForm fails to handle exceptions occuring after calling CommitEdit() or CommitNew(). E.g. RadDataForm calls CommitNew(), the repository tries to insert the new item into the db, then a "unique constraint" or other DB-error occurs, the dataform crashes. With DataGrid the approach works fine, as i subscribe the DataError event and handle the exception properly.
The only workaround now is, to catch the exception inside the CommitNew() / CommitEdit() method of the custom CollectionView() and call CancelNew() / CancelEdit() inside the catch-block. However this way the DataForm does not show an error to the user.
Using validation rules is no solution either, as some errors only occur when actually trying to insert / update an item in the database.
Best regards