Vertical datagrid for one record form

D

Dan Williams

Anyone know if i can take advantage of the datagrid features and use
it in a vertical format to view and edit one record from a database?

For example,


Name:
Address:
Town:
County:
Post Code:
Email Address:
Telephone:
Mobile:
etc...

Can anyone point me to some examples of how to go about it?

Cheers

Dan Williams.
(used to using Classic ASP!)
 
S

Scott Mitchell [MVP]

Dan said:
Anyone know if i can take advantage of the datagrid features and use
it in a vertical format to view and edit one record from a database?

Dan, the DataGrid really isn't useful for this. The DataGrid is good
for displaying a number of records from a database in a grid-like
fashion. For your particular problem, I'd just use Web controls like
TextBoxes and such formatted inside an HTML <table> or <div> or whatever...

That is, you'd do:

Name: <asp:TextBox ... />
Age: <asp:TextBox ... />
....

That is, you'd NOT use a DataGrid (or DataList or Repeater), as the
DataGrid's for displaying a sequence of items...

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 
D

Dan Williams

Scott Mitchell said:
Dan, the DataGrid really isn't useful for this. The DataGrid is good
for displaying a number of records from a database in a grid-like
fashion. For your particular problem, I'd just use Web controls like
TextBoxes and such formatted inside an HTML <table> or <div> or whatever...

That is, you'd do:

Name: <asp:TextBox ... />
Age: <asp:TextBox ... />
...

That is, you'd NOT use a DataGrid (or DataList or Repeater), as the
DataGrid's for displaying a sequence of items...

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!

So I have to completely write my own customized code in order to do
this, much like i had to in ASP? (thought .NET speeded things up!!)

Can anyone point me to some examples of how to display existing data
from a database in my web controls, along with edit, update & cancel
buttons, and how i go about posting it back to my database. All the
examples i've read in ASP.NET books take advantage of Datagrids to
work with SQL Server database data.

thanks again

Dan.
 
S

Scott

I kind of think a DataGrid would work great for this kind of thing; here's a link that describes exactly what you want:

http://msdn.microsoft.com/msdnmag/issues/02/04/cutting/

Scott

Dan Williams said:
Dan, the DataGrid really isn't useful for this. The DataGrid is good
for displaying a number of records from a database in a grid-like
fashion. For your particular problem, I'd just use Web controls like
TextBoxes and such formatted inside an HTML <table> or <div> or whatever...

That is, you'd do:

Name: <asp:TextBox ... />
Age: <asp:TextBox ... />
...

That is, you'd NOT use a DataGrid (or DataList or Repeater), as the
DataGrid's for displaying a sequence of items...

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!

So I have to completely write my own customized code in order to do
this, much like i had to in ASP? (thought .NET speeded things up!!)

Can anyone point me to some examples of how to display existing data
from a database in my web controls, along with edit, update & cancel
buttons, and how i go about posting it back to my database. All the
examples i've read in ASP.NET books take advantage of Datagrids to
work with SQL Server database data.

thanks again

Dan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top