By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,583 Members | 594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,583 IT Pros & Developers. It's quick & easy.

Vertical datagrid for one record form

P: n/a
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!)
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Dan Williams wrote:
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
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
Nov 18 '05 #2

P: n/a
"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:<tG******************@newssvr29.news.prodigy. com>...
Dan Williams wrote:
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
mi******@4guysfromrolla.com
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.
Nov 18 '05 #3

P: n/a

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" <da**********@newcross-nursing.com> wrote in message news:2e**************************@posting.google.c om...
"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:<tG******************@newssvr29.news.prodigy. com>...
Dan Williams wrote:
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
mi******@4guysfromrolla.com
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.
Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.