Adding a Incrementing Column to a Grid View

Discussion in 'ASP .Net' started by Glenn, May 15, 2006.

  1. Glenn

    Glenn Guest

    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, May 15, 2006
    #1
    1. Advertising

  2. Glenn

    rjl Guest

    just add a column and give it the value of the grid view current row
    index.
     
    rjl, May 15, 2006
    #2
    1. Advertising

  3. Glenn

    Jeff Dillon Guest

    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:...
    >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, May 15, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fernando Lopes

    Add a radio button column in a grid view

    Fernando Lopes, Dec 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,916
    Fernando Lopes
    Dec 7, 2004
  2. Luqman
    Replies:
    2
    Views:
    3,885
    Luqman
    Feb 1, 2006
  3. Evian Spring
    Replies:
    2
    Views:
    4,997
    Evian Spring
    Feb 16, 2006
  4. wahtnamas
    Replies:
    0
    Views:
    946
    wahtnamas
    May 1, 2009
  5. Parthiv Joshi
    Replies:
    1
    Views:
    825
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page