adding serial no column in a bounded data grid

Discussion in 'ASP .Net' started by Vikramaditya Singh, Jan 28, 2004.

  1. i want to show a serial no column in a data grid which is bounded to a data
    table. Is it possible. does datagrid has some property to do this
     
    Vikramaditya Singh, Jan 28, 2004
    #1
    1. Advertising

  2. You can use the event named "OnItemDataBound" to create/Add serial numbers to the datagrid rows.

    Sub RowSerial(s object, e as DataGridItemEventArgs)
    If e.Item.ItemType <> ListItemType.Header Then
    ' Additon to cell 0 goes here
    End If
    End sub

    Write further if more clarification are required.

    Avneesh
     
    =?Utf-8?B?QXZuZWVzaA==?=, Jan 28, 2004
    #2
    1. Advertising

  3. Vikramaditya Singh

    Vicky Guest

    Thanks it works for me


    "Avneesh" <> wrote in message
    news:...
    > You can use the event named "OnItemDataBound" to create/Add serial numbers

    to the datagrid rows.
    >
    > Sub RowSerial(s object, e as DataGridItemEventArgs)
    > If e.Item.ItemType <> ListItemType.Header Then
    > ' Additon to cell 0 goes here
    > End If
    > End sub
    >
    > Write further if more clarification are required.
    >
    > Avneesh
    >
     
    Vicky, Jan 28, 2004
    #3
  4. Saravana [MVP], Jan 28, 2004
    #4
    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. C Newby
    Replies:
    7
    Views:
    611
    C Newby
    Apr 2, 2004
  2. RSB
    Replies:
    2
    Views:
    1,261
    John Saunders
    Jul 27, 2004
  3. =?Utf-8?B?YmFzdWxhc3o=?=

    How can I display data in bounded colums?

    =?Utf-8?B?YmFzdWxhc3o=?=, May 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    343
    Scott Allen
    May 11, 2005
  4. Max Kotasek
    Replies:
    4
    Views:
    1,030
    Max Kotasek
    Apr 9, 2010
  5. Vasantha peddireddy

    Adding a href link to a column in a data grid

    Vasantha peddireddy, Aug 23, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    138
    Elton Wang
    Aug 23, 2005
Loading...

Share This Page