How to store name/value pairs in DataGrid?

Discussion in 'ASP .Net Web Controls' started by Jon J., Oct 11, 2004.

  1. Jon J.

    Jon J. Guest

    I want to show a Status name in a BoundColumn, and somehow save its ID so I
    can retrieve it later. I have tried using a 2nd BoundColumn that is hidden
    (Visible="False"), but the hidden column is not accessible using this in the
    Update event:

    public void OnUpdate(object sender, DataGridCommandEventArgs e)
    {
    TableCell pidCell = e.Item.Cells[1];

    }

    --
    Jon
    Jon J., Oct 11, 2004
    #1
    1. Advertising

  2. Jon J.

    Jon J. Guest

    Sorry, that was a premature ENTER key. =]

    I meant to add that the TableCell I want to extract from is blank. I am
    binding the grid with a DataTable (for paging), so I assume there is a way to
    ref that table?

    Thanks in advance for your help,

    Jon

    "Jon J." wrote:

    > I want to show a Status name in a BoundColumn, and somehow save its ID so I
    > can retrieve it later. I have tried using a 2nd BoundColumn that is hidden
    > (Visible="False"), but the hidden column is not accessible using this in the
    > Update event:
    >
    > public void OnUpdate(object sender, DataGridCommandEventArgs e)
    > {
    > TableCell pidCell = e.Item.Cells[1];
    >
    > }
    >
    > --
    > Jon
    Jon J., Oct 11, 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. I R BABOON
    Replies:
    0
    Views:
    313
    I R BABOON
    Oct 21, 2003
  2. TR
    Replies:
    3
    Views:
    1,216
  3. =?Utf-8?B?RGlmZmlkZW50?=
    Replies:
    3
    Views:
    823
    Juan T. Llibre
    May 13, 2005
  4. Replies:
    1
    Views:
    1,651
    Bjorn Abelli
    Apr 24, 2006
  5. Ramon F Herrera
    Replies:
    3
    Views:
    6,367
    Cambridge Ray
    Jul 27, 2011
Loading...

Share This Page