Getting Values from a datagrid row

Discussion in 'ASP .Net Web Controls' started by Lee Trotter, Aug 3, 2004.

  1. Lee Trotter

    Lee Trotter Guest

    Hi All,

    I have a datagrid that i have enabled the select button on. When then user
    clicks the select button for a row I need to get the values out of the 3
    fields in that row.

    Has anyone been able to do this before? A link or code example would be
    great.

    Thanks

    Lee
    Lee Trotter, Aug 3, 2004
    #1
    1. Advertising

  2. Lee Trotter

    Scott M. Guest

    In the DataGrid's SelectCommand Event Handler:

    'This assumes that the data to get is in TextBox controls
    'If not, adjust the variable declaration accordingly
    Dim x, y, z as textbox
    x = e.item.findcontrol(controlName)
    y = e.item.findcontrol(controlName)
    z = e.item.findcontrol(controlName)

    At this point, you can get the data from the text property of x, y and z.



    "Lee Trotter" <latrotter@@@sympatico.ca> wrote in message
    news:%...
    > Hi All,
    >
    > I have a datagrid that i have enabled the select button on. When then

    user
    > clicks the select button for a row I need to get the values out of the 3
    > fields in that row.
    >
    > Has anyone been able to do this before? A link or code example would be
    > great.
    >
    > Thanks
    >
    > Lee
    >
    >
    Scott M., Aug 3, 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. =?Utf-8?B?U3VyZXNo?=
    Replies:
    1
    Views:
    464
    Saravana
    Nov 22, 2004
  2. Usenet User
    Replies:
    2
    Views:
    1,298
    Usenet User
    Sep 13, 2005
  3. D
    Replies:
    0
    Views:
    203
  4. Usenet User

    HELP: Getting row column values in ASP.NET datagrid?

    Usenet User, Sep 10, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    155
    Usenet User
    Sep 13, 2005
  5. AlainCD
    Replies:
    0
    Views:
    202
    AlainCD
    Jan 12, 2006
Loading...

Share This Page