I have been experimenting on the RadDataForm control hooked up to the domaindatasource using (almost) pure XAML, and i noticed following behaviour.
I'm using default modus (so autogeneration of fields, all features enabled)
To delete a record permanently, it seems like i need to take following actions:
1. Put the record in edit mode by clicking edit
2. Click the delete button
3. Click on the ok button to confirm the delete
Still this is not enough... in code behind i have to add specific code to Submit the changes (Datasource.SubmitChanges();)
If i don't add this line of code ... the application will delete the record... but not permanently !. Restarting the application will show the record i deleted is still there.
I have noticed that in some cases (though not all the time) when i delete the record without being in edit mode and i use the navigation buttons then the record will be deleted permanently.
First of all... the "AutoCommit" property on the dataform should do what it says, there should be no more additional code required. Imagine scenario's where MVVM is mandatory, the one line of code would have be replaced with a viewmodel with 100+ lines... (i know because i tried it).
Second... it seems very unintuitive that a user would first click edit than delete and than ok to effectively delete a record, imagine the horror of explaining that to the average user. Clicking delete should simply raise an (optional) message "are you sure", and be done with it.
I like the way you can just connect RadDataForm and RadDomainDatasource together and (almost) do CRUD without any line of code or MVVM... This is an absolute time saver.
I'm using default modus (so autogeneration of fields, all features enabled)
To delete a record permanently, it seems like i need to take following actions:
1. Put the record in edit mode by clicking edit
2. Click the delete button
3. Click on the ok button to confirm the delete
Still this is not enough... in code behind i have to add specific code to Submit the changes (Datasource.SubmitChanges();)
If i don't add this line of code ... the application will delete the record... but not permanently !. Restarting the application will show the record i deleted is still there.
I have noticed that in some cases (though not all the time) when i delete the record without being in edit mode and i use the navigation buttons then the record will be deleted permanently.
First of all... the "AutoCommit" property on the dataform should do what it says, there should be no more additional code required. Imagine scenario's where MVVM is mandatory, the one line of code would have be replaced with a viewmodel with 100+ lines... (i know because i tried it).
Second... it seems very unintuitive that a user would first click edit than delete and than ok to effectively delete a record, imagine the horror of explaining that to the average user. Clicking delete should simply raise an (optional) message "are you sure", and be done with it.
I like the way you can just connect RadDataForm and RadDomainDatasource together and (almost) do CRUD without any line of code or MVVM... This is an absolute time saver.