General information
Category:
The Mere Mortals .NET Framework
Title:
Navigating DataView
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
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only