Binding TextBox programatically

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
 
S

Steven Smith

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
 
O

One Handed Man [ OHM# ]

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)
 
C

Cor

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top