By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

Paste into bound textbox

P: n/a
Not sure why this is an issue, but apparently when you paste a string into a
textbox that is bound to a dataset/datasource, it does not save into the
dataset. I've tried several things including moving the
BindingContext.Position but I haven't found an easy way short of handling
updating the dataset manually.

Anyone have any experience with this and how to get around it?

-Howard

--
-----------------------------------------------
Howard Minor
Software Engineer
ho****@medcomsolutions.com
814.833.8481
Nov 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Howard,

Mostly
Bindingcontext(dataset/datasource).endcurrentedit

I hope this helps?

Cor
Nov 20 '05 #2

P: n/a
Thanks for the quick and good response. The pasting works but what about
this scenario:

textbox1.text = textbox1.text & " new string appended"

Doesn't seem to commit that to the datasource.

hmmm...
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uw*************@TK2MSFTNGP12.phx.gbl...
Howard,

Mostly
Bindingcontext(dataset/datasource).endcurrentedit

I hope this helps?

Cor


Nov 20 '05 #3

P: n/a
Hi Howard,

I am not sure, can you try it yourself by showing the textbox first, a lot
of things to the controls start when the control is showed.

textbox1.show

Give a message when it works and as well when not?

Cor

textbox1.text = textbox1.text & " new string appended"

Doesn't seem to commit that to the datasource.

hmmm...

Nov 20 '05 #4

P: n/a
Thanks again...

It's already well visible as the form is loaded. I basically have a bound
textbox and a button next to it. The button opens another module that just
returns a string selected from another form. The code then appends the new
string to the existing in the textbox using that code below. I've tried the
..AppendText function too with the same result.

The bound dataset does not update and does not show any changes. I have to
manually click in the textbox and type something for it to register.

I do have it set to multiline if that matters...

-How
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Howard,

I am not sure, can you try it yourself by showing the textbox first, a lot
of things to the controls start when the control is showed.

textbox1.show

Give a message when it works and as well when not?

Cor

textbox1.text = textbox1.text & " new string appended"

Doesn't seem to commit that to the datasource.

hmmm...


Nov 20 '05 #5

P: n/a
On Mon, 26 Jul 2004 14:57:11 -0400, "Howard Minor"
<ho****@medcomsolutions.com> wrote:
Thanks again...

It's already well visible as the form is loaded. I basically have a bound
textbox and a button next to it. The button opens another module that just
returns a string selected from another form. The code then appends the new
string to the existing in the textbox using that code below. I've tried the
.AppendText function too with the same result.

The bound dataset does not update and does not show any changes. I have to
manually click in the textbox and type something for it to register.

I do have it set to multiline if that matters...


Had the same problem. I found just focusing the textbox forced it to update
the dataset table.

ie:

textbox1.text = "new text"
textbox1.focus()

Works but there is probably a more "correct" way to it. (I'm only just
learning VB myself :) )

Steve

Nov 20 '05 #6

P: n/a
Hi Howard,

In addition to Steve,

Normally it is better to update the datasource and not the control.

You can use the currencymanager (has nothing to do with money, manages the
current used row) for that, if you do not know how to use that message
than, than I make a very small sample.

I hope this helps?

Cor
Nov 20 '05 #7

P: n/a
Thanks, I ended up just updating the datasource rather than the control.
That makes more sense anyway.

Good tip on the focus though. I didn't think of that either.

Thanks again for the help,
Howard
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Howard,

In addition to Steve,

Normally it is better to update the datasource and not the control.

You can use the currencymanager (has nothing to do with money, manages the
current used row) for that, if you do not know how to use that message
than, than I make a very small sample.

I hope this helps?

Cor

Nov 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.