Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MmUltraButtonDelete.BindingSource for DataView
Message
De
17/05/2005 15:27:38
Patty Solomon
Central Susquehanna Intermediate Unit
Milton, Pennsylvanie, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
MmUltraButtonDelete.BindingSource for DataView
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01015058
Message ID:
01015058
Vues:
59
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
Fil
Voir

Click here to load this message in the networking platform