BindingContext - Textbox bug?

G

graham

Hi all,

I have a strange one, and being new to .NET, not sure if this is a bug and
whether there is a work around.

I have a form with databound textboxes..

In me general decs...

Dim bmbLinkMAN As BindingManagerBase

In my form load I have..

bmbLinkMAN = Me.BindingContext(dsLinkMAN_client_trans_1, "client_trans")

And my text boxes have the binding data in them..
e.g. txtpath has he correct databindings..

When I try to add a row - by performing a bmbLinkMAN.AddNew()

I then try to assign a default value to the field by doing

txtpath.Text = path

When I hover over the field AND the txtpath.Text code in debug, it does show
the value. But the textbox at no time shows any contents.
Is there a databing issue here?

If anyone knows of this problem/workaaround/what I;m doing wrong.... I'd
appreciate any help.

Thanks,
Graham
 
C

Cor Ligthert

Hi Graham,

Are you sure this is not the normal repeatly asked question about:

BindingContext(ds.Tables(0)).EndCurrentEdit()

When the data is in the textbox and the focus is still on it, there has not
been binding yet happen.

I hope this helps a little bit?

Cor
 
G

graham

Yep, that was it Cor. Thanks.

I did find the solution elsewhere - but I guess this is a common NewB
question.... now, if only there was a definitive FAQ site...... ;-)

Thanks again,
Graham
 

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