Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Navigating DataView
Versions des environnements
I'm unable to navigate to a new row in a grid when the DataSource is a DataView. The navigation is applied to the DataSet instead of the DataView.
What does the grid's DataSource have to be set to for the Navigation code to function correctly?
Sample of current code with explanation:
Form fields exist of types mmDataSet and DataView and are set in the CreatePrimaryDataSet method. The oChildBO.HookPostGetData method creates a DataView that keeps the order of the data correct as rows are added via the maintenance form...
dsChildData = ((CHILD_BO)oChildBO).GetRecordsByParentPK(this.CurrentPrimaryKey);
dvChildData = dsChildData.GetDataView("dvSortedChild", oChildBO.TableName);
In FormDataBindingChildren method, the grid's DataSource is set...
this.gridChildren.DataSource = dvChildData;
DataMember is not set on the grid.
I've verified the DataView exists in the DataSet. When a new record is added, the MMF framework does not recognize the grid.DataSource as a DataView.
After walking through the MMF code several times, I feel that the grid's DataSource is the issue. All 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