I've gotten the textboxes bound to the dataview...
getting the comboboxes bound is another story.....
Me.cboIndustry.DataSource = mDV
Me.cboIndustry.DisplayMember = "NAICSdesc"
Me.cboIndustry.ValueMember = "industryID"
Me.cboIndustry.DataBindings.Remove(Me.cboIndustry. DataBindings(0))
Me.cboIndustry.DataBindings.Add(New
System.Windows.Forms.Binding("SelectedValue", mdv, "industryID"))
yields "system.data.datarowView" in the combobox.....
Is there an easier way to do this rather then looping through the controls
and manually repointing them to the DataView? Can't I redirect the form
binder instead?
How difficult does it have to be to put one filter on a form's dataset?
(sorry - blowing off some steam)
"Ronchese" <ro******@smlinfo.com.br> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
I believe your controls are binded to a datatable, which dont have Filter
actions available.
So, if you use the DefaultView, this view is autocreated and autodestroied
when the code run out of that line.
What you need to do is bind your controls to a dataview which needs to
keep
itself alive with your program.
[]s
Cesar
"astro" <as***@mnrr.com> escreveu na mensagem
news:LU******************@tornado.rdc-kc.rr.com...
I am trying to setup a filter for the dataset on a form as follows:
Me.Ds1.Tables("company").DefaultView.RowFilter = "city='New York'"
But nothing happens when this code is executed. The same 7k records are
available in the databindings.
What am I missing here conceptually? Should I be applying this to the
bindingManagerBase or something?
Thanks.