DataGrid controls

Discussion in 'ASP .Net Datagrid Control' started by Bonj, Nov 11, 2004.

  1. Bonj

    Bonj Guest

    When handling the datagrid's OnEditCommand handler, the
    DataGridCommandEventArgs has an Item property, which has a collection of
    controls. One of these contains three subcontrols, the middle one (id 1 of 0,
    1 and 2) of these subcontrols is the control (textbox) that contains the
    value I want to update the datagrid's underlying data with.

    My question is, short of doing two loops everytime to find the right
    control, what is the best way of doing this?
    Bonj, Nov 11, 2004
    #1
    1. Advertising

  2. Bonj

    Philip Rieck Guest

    Look at the FindControl method (e.item.findcontrol) which looks for multiple
    layer sub-controls of the current control by ID



    --
    -Philip Rieck
    http://philiprieck.com/blog/

    -
    "Bonj" <> wrote in message
    news:...
    > When handling the datagrid's OnEditCommand handler, the
    > DataGridCommandEventArgs has an Item property, which has a collection of
    > controls. One of these contains three subcontrols, the middle one (id 1 of
    > 0,
    > 1 and 2) of these subcontrols is the control (textbox) that contains the
    > value I want to update the datagrid's underlying data with.
    >
    > My question is, short of doing two loops everytime to find the right
    > control, what is the best way of doing this?
    >
    Philip Rieck, Nov 11, 2004
    #2
    1. Advertising

  3. Bonj

    Bonj Guest

    Thanks!

    "Philip Rieck" <> wrote in message
    news:...
    > Look at the FindControl method (e.item.findcontrol) which looks for
    > multiple layer sub-controls of the current control by ID
    >
    >
    >
    > --
    > -Philip Rieck
    > http://philiprieck.com/blog/
    >
    > -
    > "Bonj" <> wrote in message
    > news:...
    >> When handling the datagrid's OnEditCommand handler, the
    >> DataGridCommandEventArgs has an Item property, which has a collection of
    >> controls. One of these contains three subcontrols, the middle one (id 1
    >> of 0,
    >> 1 and 2) of these subcontrols is the control (textbox) that contains the
    >> value I want to update the datagrid's underlying data with.
    >>
    >> My question is, short of doing two loops everytime to find the right
    >> control, what is the best way of doing this?
    >>

    >
    >
    Bonj, Nov 11, 2004
    #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. trinitypete

    HTML Controls and User controls

    trinitypete, Jun 25, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    3,373
    trinitypete
    Jun 26, 2003
  2. thegame
    Replies:
    1
    Views:
    938
    =?Utf-8?B?ZGlyazQx?=
    Feb 28, 2005
  3. Nathan Sokalski
    Replies:
    4
    Views:
    1,141
    Muhammad Naveed Yaseen
    Sep 5, 2007
  4. Andreas Klemt
    Replies:
    0
    Views:
    292
    Andreas Klemt
    Oct 8, 2003
  5. Replies:
    1
    Views:
    331
Loading...

Share This Page