Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Adding a Incrementing Column to a Grid View

Reply
Thread Tools

Adding a Incrementing Column to a Grid View

 
 
Glenn
Guest
Posts: n/a
 
      05-15-2006
I have a grid view which takes its data from an SQL query.

The query returns a league Table of results. I would like to a add a
column which show the poistion of result (i.e 1,2,3,4)

how can i get add a column which simply showns an incremented number
for each row.

 
Reply With Quote
 
 
 
 
rjl
Guest
Posts: n/a
 
      05-15-2006
just add a column and give it the value of the grid view current row
index.

 
Reply With Quote
 
 
 
 
Jeff Dillon
Guest
Posts: n/a
 
      05-15-2006
You could generate it in the original SQL statement. Use a temp table with
an identity column, and fill it with the original data, and then select from
the temp table.

Jeff

"Glenn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I have a grid view which takes its data from an SQL query.
>
> The query returns a league Table of results. I would like to a add a
> column which show the poistion of result (i.e 1,2,3,4)
>
> how can i get add a column which simply showns an incremented number
> for each row.
>



 
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
How to? Create grid layout in grid view wahtnamas ASP .Net 0 05-01-2009 06:10 AM
template column checkbox problem in grid view Smokey Grindle ASP .Net 2 06-28-2006 01:01 AM
.NET 2.0 Grid View Control and the hyperlinkfield column Evian Spring ASP .Net 2 02-16-2006 12:38 AM
Edit Mode of Grid View and Detail View Control ? Luqman ASP .Net 2 02-01-2006 08:14 AM
Add a radio button column in a grid view Fernando Lopes ASP .Net 3 12-07-2004 01:20 PM



Advertisments