Vertical datagrid for one record form

  • Thread starter Thread starter Dan Williams
  • Start date Start date
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!)
 
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!
 
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.
 
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.
 
Back
Top