473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Vertical datagrid for one record form

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
3 1724
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
"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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: James Norton-Jones | last post by:
Hi, Am I trying to hold the data of a DataGrid in a label so that when the form is reposted the DataGrid can be repopulated. The problem I am having is that I don't understand how to get the...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Dan Williams | last post by:
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:
1
by: Dave Taylor | last post by:
I have a StatusBar control docked to the bottom of the screen, a horizontal splitter control just above that, and then a DataGrid control that has its docking property set to Fill above that. (I'm...
0
by: DraguVaso | last post by:
Hi, I'm having a DataGrid on which I want to draw 2 moveable vertical lines. What should happen is: When I move a vertical line, I have somewhere an indication on which character in the datagrid...
2
by: Adda | last post by:
I have a datagrid on a parent mdi form with connection1, dataAdapter1, dataset1. From a main menu I call a child form where I enter new data and update dataset1 with dataAdapter2, connection2 on...
2
by: Gene Hubert | last post by:
I'm assigning a new datasource (a datatable) to a datagrid that is aready displayed in a form. Then I assign a new value to CurrentRowIndex. The datagrid always scrolls so that the new current...
9
by: mfahnestock | last post by:
Hi all! Aspiring VB programmer losing hair <And Sleep> over this problem. I have spent several days researching through the various usenets and resources to no avail, and so now I am taking the...
3
by: Brian Tkatch | last post by:
I have a form with two DataGrids, which are kept in sync manually via Stored PROCEDURE calls. That is, when a record is selected on the first grid, a stored PROCEDURE is CALLed to Fill() the next...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.