Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to display datatable columns as rows in datagrid?

Reply
Thread Tools

how to display datatable columns as rows in datagrid?

 
 
Bob
Guest
Posts: n/a
 
      07-31-2004
I have a User table that stores user info (such as first name, last name,
address etc) in columns, that is, one user per row. However, when
displaying out for editing one user, I'd like it to be displayed in two
columns, field names as labels in the left column and field values in
textboxes in the right column. Could anyone suggest how this can be done
without looping through the field and adding the row in the datagrid one at
a time?

Thanks in advance
Bob


 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      08-01-2004
Bob,

Instead of using a datagrid try out using a repeater instead.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
" Bob" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I have a User table that stores user info (such as first name, last name,
> address etc) in columns, that is, one user per row. However, when
> displaying out for editing one user, I'd like it to be displayed in two
> columns, field names as labels in the left column and field values in
> textboxes in the right column. Could anyone suggest how this can be done
> without looping through the field and adding the row in the datagrid one

at
> a time?
>
> Thanks in advance
> Bob
>
>



 
Reply With Quote
 
 
 
 
Saber
Guest
Posts: n/a
 
      08-01-2004
As S. Justin said, it is better to use repeater instead, but if you just
want datagrid here is an article:
http://www.codeproject.net/cs/databa...n_Datagrid.asp

~~~~~~~~~~~~~~~~~~~~
Saber S.
http://maghalat.com (Persian)
~~~~~~~~~~~~~~~~~~~~

" Bob" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have a User table that stores user info (such as first name, last name,
> address etc) in columns, that is, one user per row. However, when
> displaying out for editing one user, I'd like it to be displayed in two
> columns, field names as labels in the left column and field values in
> textboxes in the right column. Could anyone suggest how this can be done
> without looping through the field and adding the row in the datagrid one
> at
> a time?
>
> Thanks in advance
> Bob
>
>



 
Reply With Quote
 
William Gower
Guest
Posts: n/a
 
      08-01-2004
Why not just use an HTML table?

"Saber" <saber[--AT--]maghalat.com> wrote in message
news:(E-Mail Removed)...
> As S. Justin said, it is better to use repeater instead, but if you just
> want datagrid here is an article:
> http://www.codeproject.net/cs/databa...n_Datagrid.asp
>
> ~~~~~~~~~~~~~~~~~~~~
> Saber S.
> http://maghalat.com (Persian)
> ~~~~~~~~~~~~~~~~~~~~
>
> " Bob" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> >I have a User table that stores user info (such as first name, last name,
> > address etc) in columns, that is, one user per row. However, when
> > displaying out for editing one user, I'd like it to be displayed in two
> > columns, field names as labels in the left column and field values in
> > textboxes in the right column. Could anyone suggest how this can be

done
> > without looping through the field and adding the row in the datagrid one
> > at
> > a time?
> >
> > Thanks in advance
> > Bob
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using Dataset and DataTable to display selected columns arun.11 ASP .Net 0 07-05-2011 07:18 AM
display 3 columns of 50 rows in stead of 1 column per row inGridview/Repeater/Listview/Datalist ethem ASP .Net 1 03-02-2011 04:23 AM
Howto display an ASP.net datagrid rows as columns and vice versa? Jimmy ASP .Net 1 06-14-2005 03:30 PM
convert rows to columns and columns to rows helpful sql ASP .Net 0 05-19-2005 06:03 PM
Adding DataTable Rows To another DataTable J. Babe ASP .Net 1 08-15-2003 05:04 PM



Advertisments