M
michael sorens
I have generated an XmlDocument, then bound it to a DataGridView (thanks
to a pointer from PeterBromberg in a separate, recent posting). Now I want
to connect a BindingNavigator, but my rudimentary attempt failed.
In the Visual Designer I added a BindingSource bs, then a BindingNavigator
bn, and assigned bs to the BindingSource property of bn. In code, I
generate my XmlDocument, massage it to fit into a DataSet, then assign it
to the DataSource property of my DataGridView dgv. That all works.
I then tried setting bs.DataSource to dgv.DataSource and bs.DataMember to
dgv.DataMember. The only thing that did for me is provide a correct record
count in the Binding Navigator when executed. The only affect of the
navigation arrows is to alter the count in the BindingNavigator--no
changes in the active row in the DataGridView occur. So clearly I am
missing one or more pieces...
to a pointer from PeterBromberg in a separate, recent posting). Now I want
to connect a BindingNavigator, but my rudimentary attempt failed.
In the Visual Designer I added a BindingSource bs, then a BindingNavigator
bn, and assigned bs to the BindingSource property of bn. In code, I
generate my XmlDocument, massage it to fit into a DataSet, then assign it
to the DataSource property of my DataGridView dgv. That all works.
I then tried setting bs.DataSource to dgv.DataSource and bs.DataMember to
dgv.DataMember. The only thing that did for me is provide a correct record
count in the Binding Navigator when executed. The only affect of the
navigation arrows is to alter the count in the BindingNavigator--no
changes in the active row in the DataGridView occur. So clearly I am
missing one or more pieces...