Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Adding a Incrementing Column to a Grid View

 
Thread Tools Search this Thread
Old 05-15-2006, 08:58 PM   #1
Default Adding a Incrementing Column to a Grid View


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.



Glenn
  Reply With Quote
Old 05-15-2006, 09:42 PM   #2
rjl
 
Posts: n/a
Default Re: Adding a Incrementing Column to a Grid View
just add a column and give it the value of the grid view current row
index.



rjl
  Reply With Quote
Old 05-15-2006, 09:59 PM   #3
Jeff Dillon
 
Posts: n/a
Default Re: Adding a Incrementing Column to a Grid View
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" <> wrote in message
news: 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.
>





Jeff Dillon
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
TRADING FEMALE CELEB INTERVIEWS ON DVD stu DVD Video 1 05-26-2008 09:39 AM
ASP.Net 2.0 - Want details view but need control & placement of textboxes etc. daveydave999 Software 0 10-05-2007 04:12 PM
asp.net : custom code to delete data from Grid view (Database) sara_23apr Software 1 06-19-2007 01:08 PM
Grid view in link using C# yogarajan Software 0 05-05-2007 08:28 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46