Having data post to a multi-line textbox from a datagridview query???!!!

Status
Not open for further replies.

drew4663

Well-known member
Joined
May 3, 2007
Messages
62
Programming Experience
1-3
SETUP:
I have 1 database, 1 table and a few columns. I have setup a datagridview to allow for me to filter, by date, the records I want shown. (Example: search all records for 04/23/12 and it will return every record that contains that date.)

ISSUE:
When I press the search button and it displays two columns of info based on my search I want the data, no matter how many records there are, to be copied & pasted to a multi-line textbox of just one column.

Example:
When the form loads it fills the datagridview with all records
sopID(primary) | DATE | CASE NUMBER
1 04/21/12 17102652
2 04/23/12 17104852
3 04/23/12 17102264
4 04/25/12 17126854

Then, I enter search of 04/23/12 and press find and it returns
sopID(primary) | DATE | CASE NUMBER
2 04/23/12 17104852
3 04/23/12 17102264

All of this is working correctly. What I then want in the mulitline textbox is just the case number.

17104852
17102264


I have been able to send only the selected cell so far but I want it to be auto and multiple. As soon as they hit find I want the data to populate in the grid for verification and the result to populate a multiline textbox to the right on the same form.
Any help with this would be greatly appreciated.
 
I can honestly say that I never would have thought of that because it's a filthy hack. If it works and you're happy with a filthy hack then that's fine but you probably ought to mention when you ask a question that you have no interest in good programming practices because anyone who assumes that you are would never suggest such a solution. You're going to find a lot of people try to get you to do things the right way and it will wind up being a big waste of your time and theirs.
 
Don't be mad at me because I found the solution and you couldn't!

I'm no madder at you for that than a mechanic would be at someone who used a pair of stockings instead of a fan belt, but if you want to make me mad then you should continue with the childish taunts. I'm saying that, for your benefit, you should let people know in future that all you care about is the end result and not the manner in which it's achieved. You seem displeased that I tried to get you to spend time learning how to program so, to avoid such displeasure in the future, you should let people know that you don't want to learn how to program.
 
Status
Not open for further replies.
Back
Top