Binding TextBox programatically

  • Thread starter Thread starter Steven Smith
  • Start date Start date
S

Steven Smith

Hi guy's

whats the syntax for binding the text property of a
textbox to a particular field in a dataview
programatically ?

here's the scenario my form has two main sections the
first is a datagrid the second is a series of textboxes
which are initailly bound to the same full dataset and
later depending on actions taken by the user are bound to
the dataview I've figured out how to change the binding
of the datgrid but am struggling to get the syntax
correct for switching the binding of the textboxes

Regards Steve
 
Thanks Cor just had a look at that and some of the
samples look extremely useful but I can't find what I'm
looking for :s

One thing I do know for sure though is I'll never use
another connection wizard as long as I live this is the
first and last time. It looked like the best option at
the time but now seems pretty pointless if you want to do
anything other than just display data.

Regards Steve
 
Hi Steve,

This might help.

Regards - OHM


http://www.codeproject.com/vb/net/databindingconcepts.asp



Steven said:
Thanks Cor just had a look at that and some of the
samples look extremely useful but I can't find what I'm
looking for :s

One thing I do know for sure though is I'll never use
another connection wizard as long as I live this is the
first and last time. It looked like the best option at
the time but now seems pretty pointless if you want to do
anything other than just display data.

Regards Steve

Regards - OHM# (e-mail address removed)
 
Hi Steven,

I thought that the first sample from the window aplications does very much
what you where asking.

I did try it and I did add
Private dv as dataview

Then I changed everywhere
productInfo.Products in dv

The rows from the dataadapter I did rename back to
productAdapter.Fill(productInfo.Products)

And then added this row beneath it
dv = New DataView(productInfo.Products)

I think you have than your sample with a very simple dataview

Cor
 
Back
Top