LinkButton Events

Discussion in 'ASP .Net' started by Bijoy Naick, Nov 25, 2004.

  1. Bijoy Naick

    Bijoy Naick Guest

    I have 2 datagrids, lets call them src and dest. I run a query and databind
    to src. Src contains a column called "name".

    I use a templatecolumn to display the name as a LinkButton. I want the user
    to be able to click on a name, which will then run another query and display
    all the records pertaining to that name in the dest datagrid.

    How do I set this up? Can I use a linkButton to do this? Which events should
    I trap and how do i get the name of the clicked name?

    Bijoy
    Bijoy Naick, Nov 25, 2004
    #1
    1. Advertising

  2. Bijoy Naick

    Karl Seguin Guest

    Bijoy,
    You might wanna take a look at:
    http://openmymind.net/databinding/index.html#8

    Which talks about how to handle events within a repeater. The basic idea is
    that the LinkButton event bubbles up to the repeater/datagrid which you can
    then catch in the ItemCommand event. At this point you can access the
    commandArgument and the commandName to figure out which button fired and get
    a variable (like the name)

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Bijoy Naick" <> wrote in message
    news:%...
    > I have 2 datagrids, lets call them src and dest. I run a query and

    databind
    > to src. Src contains a column called "name".
    >
    > I use a templatecolumn to display the name as a LinkButton. I want the

    user
    > to be able to click on a name, which will then run another query and

    display
    > all the records pertaining to that name in the dest datagrid.
    >
    > How do I set this up? Can I use a linkButton to do this? Which events

    should
    > I trap and how do i get the name of the clicked name?
    >
    > Bijoy
    >
    >
    Karl Seguin, Nov 25, 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. Sathyaish
    Replies:
    3
    Views:
    3,087
    Sathyaish
    Sep 8, 2005
  2. Replies:
    6
    Views:
    3,177
  3. Tony
    Replies:
    0
    Views:
    469
  4. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    176
    Sathyaish
    Sep 8, 2005
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    341
    Chris
    Aug 30, 2005
Loading...

Share This Page