Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

how can i display data from 3 columns into 1 textbox and user can view each record separetely (eg using next and back) . should i use data reader or data set? the first column has the date, second column for name and third column for data. i need to display it like this:

 

12/2/1980

username

any data...

 

any idea anyone??

 

thank you.

Edited by mickey
  • *Experts*
Posted

Definitely DataSet since you want paging.

 

You'll need to hook up the BindingContext object on the Form to get the Next/Prev. Check out the help.

 

To get the text formatted from 3 fields, you've got a few options. I can't really tell you which is best, so here they all are:

1. Use the Parse/Format events combined with DataBinding so that the text goes straight into the TextBox.

2. In your Next/Prev button when you change the Position property, combine the 3 fields manually using string concatenation into the one string field.

3. Add an expression column to your dataset to put all 3 fields together into one. Then you can use either direct data binding to the textbox or shove in the one value manually.

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • *Experts*
Posted

Do you need help with DataSets, moving forward/next, binding, ...? There are a lot of possible answers :)

 

If you need sample code for DataSets, look at just about any post in this forum - there is a ton of sample code. For anything else, just ask.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...