Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
MmUltraButtonDelete.BindingSource for DataView
Versions des environnements
What should the mmButtonDelete.BindingSource get set to for a DataView?
Deleting a record when the BindingSource is set to a registered Biz Object worked fine. Once the BindingSource was changed to a DataView, the wrong row is deleted.
I've got a Windows form that has a parent/child relationship that is manually controlled on the maintenance form. That is, the Biz Object properties AutoSaveOnParentSave, AutoDeleteOnParentDelete, etc. are not used.
Instead, a tabcontrol is used to display the child information, and when a specific tab is activated, the DeleteButton.DataSource is changed.
The parent table is registered as the PrimaryBizObject. The child table is registered as a Biz Object that is also a child to the PrimaryBizObject.
The child table is navigated by a grid (user selects a specific year to edit), which causes additional textboxes, dropdownlists, etc. to be refreshed with the new year-specific data every time the grid row changes. In order to make added records sort properly in the grid, the grid's DataSource has been changed from a DataSet to a DataView.
If I am understanding the MMF code correctly, it is looking for a registered Biz Object when evaluating the BindingSource on the Delete button. If the BindingSource is left empty, the framework uses the PrimaryBizObject.
If the BindingSource is set to the Biz Object the DataView was created from, the first row deletes from the Biz Object DataSet, no matter which record has been selected in the grid.
Any suggestions are appreciated.
TIA,
Patty
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement