mickey Posted January 20, 2003 Posted January 20, 2003 (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 January 21, 2003 by mickey Quote
*Experts* Nerseus Posted January 20, 2003 *Experts* Posted January 20, 2003 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 Quote "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
mickey Posted January 21, 2003 Author Posted January 21, 2003 i am sorry. i dont quite understand what u said. :confused: can u show me an example code? thanks Quote
*Experts* Nerseus Posted January 21, 2003 *Experts* Posted January 21, 2003 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 Quote "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
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.