p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   How to display dataset using textbox (http://p2p.wrox.com/showthread.php?t=1246)

RockNRoll July 4th, 2003 01:37 AM

How to display dataset using textbox
 
I am making a page to do the database modification, however, i used some autopostback properties in the page, once the autopostback is executed, the data on the textbox are set to initial values, I have an idea, I want to do the SQL query in the Page_Init(), but How could I set the initial values in the textbox control. I've wrote the code to creat the dataset, but I just don't know how to display it in the textbox, I know that I can't use the datagrid, cause I have to use the textbox to finish the database modification.

Any ideas will be appreciated.

Thanks in advance.


Imar July 4th, 2003 07:37 AM

Why can't you use a DataGrid? The DataGrid is an ideal candidate for on-line editting.
You can set a row to editable, and then supply a template for the editable row. This will allow you to present textbox, dropdown etc so the user can supply new data.

Check out the following articles about the DataGrid:

http://msdn.microsoft.com/library/de...verControl.asp

http://msdn.microsoft.com/library/de...asp?frame=true

http://msdn.microsoft.com/library/de...asp?frame=true

Alternatively, you can use a Repeater control, add textboxes to the template, and then bind the DataSet to the Repeater.

If this is not what you're after, please be more specific about what you're trying to accomplish.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.


All times are GMT -4. The time now is 07:35 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.