473,698 Members | 2,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Paste into bound textbox

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****@medcomso lutions.com
814.833.8481
Nov 20 '05 #1
7 1244
Howard,

Mostly
Bindingcontext( dataset/datasource).end currentedit

I hope this helps?

Cor
Nov 20 '05 #2
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**********@p lanet.nl> wrote in message
news:uw******** *****@TK2MSFTNG P12.phx.gbl...
Howard,

Mostly
Bindingcontext( dataset/datasource).end currentedit

I hope this helps?

Cor


Nov 20 '05 #3
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
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**********@p lanet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP10.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
On Mon, 26 Jul 2004 14:57:11 -0400, "Howard Minor"
<ho****@medcoms olutions.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
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
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**********@p lanet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
21614
by: Legendary Pansy | last post by:
I was checking out the 101 C# Samples, specifically Windows Forms - Use the Clipboard. I took a look at the code for a while, and I understand what the program is doing with the cut, copy, pasting via the file menu events using the clipboard. However, what I don't get is how is the program able to produce a context menu in the textbox area. When right clicking, the context pops up and allows to cut/copy/paste/delete, etc.. But the thing is, I...
8
10097
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for a text box has 6 items, undo, cut, copy, paste, delete and select all. I would like to add one additional paste menu that opens a new sub menu with several optional text items that could be pasted. The items would be populated by my program but...
2
1717
by: Microsoft | last post by:
I'm not sure which control to use for this: I would like the user to be able to paste a list of items into a box and then be able to run through them one at a time. Hopefully there is a control that would place them into an array. I don't want the user to put them in one at a time.. Thanks..
7
11624
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard is proving to be more difficult. These pictureboxes are bound to an AccessDB. If the user wants to add an image, they select an image using an OpenFileDialog: Dim result As DialogResult = Pic_Sel.ShowDialog() If (result = DialogResult.OK) Then
0
3004
by: colleen1980 | last post by:
Hi: There are two textboxs in my main form. One is bound and another is unbound. There is no entry in the unbound textbox as values come into automatically after entering some information in the subform. My question is how to i pass values from unbound textbox to bound textbox every time when the value change in unbound textbox i need to change the value in the bound textbox. When the form load there is already value in the bound textbox...
17
5121
by: Steve | last post by:
I'm trying to code cut, copy, and paste in vb 2005 so that when the user clicks on a toolbar button, the cut/copy/paste will work with whatever textbox the cursor is current located in (I have about 20 textboxes on the form). Also to ensure that the button can't get used if the cursor isn't in a textbox field. And to ensure the contents of the clipboard are "text" contents that have been cut/copied from one of the textboxes on the form. ...
2
2150
by: cjard | last post by:
Suppose: A TextBox is bound to a BindingSource, which is bound to a DataTable A BindingNavigator is used to alter the current row being looked at by the BindingSource (i.e. Nav's NEXT button is pressed. BS.Position changes from 2 to 3, Textbox was showing APPLE, now shows ORANGE) Does the textbox receive any notification that this occurred? If so, what?
11
9653
by: John | last post by:
Hi In a winform app I need to provide a menu with Cut, Copy and Paste options., What code do I use to accomplish cut, copy and paste features for fields on a winfrom? Thanks Regards
0
2499
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. In this table there are multiple columns that cannot be NULL, which, are bound to other controls (but they're not really important at this time). I create a new row via the currency manager like so: _currencyManager.AddNew() _currentRow =...
0
8675
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8862
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7729
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.