Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / May 2006

Tip: Looking for answers? Try searching our database.

Combining two fields in a textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lefteris Kororos - 04 May 2006 15:30 GMT
Hi,

is there a way to bind a textbox in such a way so that its text is a
concatination of two fields from a dataset?

To be more specific, I need to have a textbox with Full Name, but in
the database I have a field for First Name and a field for Last Name.

Thanks in advance,

Lefteris
Radenko Zec - 05 May 2006 10:03 GMT
You can easily to acompish this in T-SQl select statement Select (FirstName
+ LastName) as FullName.
Or  idea that cross my mind
textBox1.text=textBox1.text+''+@parameter

> Hi,
>
[quoted text clipped - 7 lines]
>
> Lefteris
Lefteris Kororos - 05 May 2006 11:27 GMT
Thanks Radenko,

I used the (FirstName+ " " +Lastname) as FullName and that worked
smoothly.
JT - 12 May 2006 04:14 GMT
Another thought...
You could define an expression datacolumn in your dataTable that
concatenates first and last name, and bind your textbox to that.
Signature

John

> Thanks Radenko,
>
> I used the (FirstName+ " " +Lastname) as FullName and that worked
> smoothly.
Lefteris Kororos - 13 May 2006 19:19 GMT
Hi John,

yes that seems to work too.

Thanks,

Lefteris

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.