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. Advertisements

  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. Advertisements

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. Bazza Formez
    Replies:
    4
    Views:
    579
    Vanni Tomezzoli
    Dec 9, 2004
  2. Mike P
    Replies:
    1
    Views:
    470
    DavidG
    Jan 13, 2006
  3. Replies:
    2
    Views:
    1,470
  4. vishnu
    Replies:
    1
    Views:
    1,436
    Patrick.O.Ige
    Mar 25, 2006
  5. johnsonlim026
    Replies:
    0
    Views:
    1,087
    johnsonlim026
    Feb 27, 2010
  6. Gregory Rampton

    Convert an MS Access Yes/No column to a checkbox column in C# datagrid

    Gregory Rampton, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    423
    Gregory Rampton
    Aug 6, 2003
  7. D
    Replies:
    0
    Views:
    500
  8. Replies:
    0
    Views:
    276
Loading...