Access DataGrid row/column value?

Discussion in 'ASP .Net Web Controls' started by Dave, Jan 23, 2004.

  1. Dave

    Dave Guest

    Hi

    Is there way to access a datagrid's row, column value by *name* in the ItemCreated or ItemDataBound events

    The only way I got this to work is using the column index in the DataGridItemEventArgs like..

    e.Item.Cells[1].Tex

    I would like to use column name such as e.Item.Cells["Company"].Text or the equivalent. Thanks, Dave.
     
    Dave, Jan 23, 2004
    #1
    1. Advertising

  2. Dave

    Sumana Guest

    Nope, I tried doing that, it did not work for me.
    Sumana
    "Dave" <> wrote in message news:<>...
    > Hi,
    >
    > Is there way to access a datagrid's row, column value by *name* in the ItemCreated or ItemDataBound events?
    >
    > The only way I got this to work is using the column index in the DataGridItemEventArgs like...
    >
    > e.Item.Cells[1].Text
    >
    > I would like to use column name such as e.Item.Cells["Company"].Text or the equivalent. Thanks, Dave.
     
    Sumana, Jan 27, 2004
    #2
    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. Mike P
    Replies:
    1
    Views:
    381
    DavidG
    Jan 13, 2006
  2. Replies:
    2
    Views:
    1,355
  3. vishnu
    Replies:
    1
    Views:
    1,242
    Patrick.O.Ige
    Mar 25, 2006
  4. D
    Replies:
    0
    Views:
    239
  5. Replies:
    0
    Views:
    180
Loading...

Share This Page