PushButton event

Discussion in 'ASP .Net Datagrid Control' started by Mark, Jul 2, 2003.

  1. Mark

    Mark Guest

    Rather than using a LinkButton for "Edit" and "Delete" in my DataGrid, I
    changed them to a PushButton style. How do you capture the event? It
    doesn't appear to work like a LinkButton.

    Thanks in advance!
    Mark
     
    Mark, Jul 2, 2003
    #1
    1. Advertising

  2. Mark

    Saravana Guest

    how did you changed to push button style, did you used buttontype property
    to mention it as pushbutton.In that case you can catch event as you do with
    link button style. You can write code for EditCommand event handler.
    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Mark" <> wrote in message
    news:...
    > Rather than using a LinkButton for "Edit" and "Delete" in my DataGrid, I
    > changed them to a PushButton style. How do you capture the event? It
    > doesn't appear to work like a LinkButton.
    >
    > Thanks in advance!
    > Mark
    >
    >
     
    Saravana, Jul 3, 2003
    #2
    1. Advertising

  3. I have had the same problem. I changed the button type property to
    pushbutton in the property
    builder. However, the event doesn't seem to fire....unless I set the
    enableviewstate of the datagrid to false...
    Am I missing something?

    "Saravana" <> wrote in message
    news:#...
    > how did you changed to push button style, did you used buttontype property
    > to mention it as pushbutton.In that case you can catch event as you do

    with
    > link button style. You can write code for EditCommand event handler.
    > --
    > Saravana
    > Microsoft India Community Star,
    > MCAD,SE,SD,DBA.
    >
    >
    > "Mark" <> wrote in message
    > news:...
    > > Rather than using a LinkButton for "Edit" and "Delete" in my DataGrid, I
    > > changed them to a PushButton style. How do you capture the event? It
    > > doesn't appear to work like a LinkButton.
    > >
    > > Thanks in advance!
    > > Mark
    > >
    > >

    >
    >
     
    Maciek Pawlowski, Jul 3, 2003
    #3
  4. Mark

    Mark Guest

    Got it to work. I don't understand it, but it works. Below is all I
    changed:

    Old code in Page_Load:

    dgSir.DataBind();

    New Code in Page_Load:

    if (!IsPostBack)
    {
    dgSir.DataBind();
    }

    So, why would the PushButton be affected by a re-binding of the data, but
    the LinkButton wouldn't?

    Thanks.

    Mark

    "Maciek Pawlowski" <> wrote in message
    news:...
    > I have had the same problem. I changed the button type property to
    > pushbutton in the property
    > builder. However, the event doesn't seem to fire....unless I set the
    > enableviewstate of the datagrid to false...
    > Am I missing something?
    >
    > "Saravana" <> wrote in message
    > news:#...
    > > how did you changed to push button style, did you used buttontype

    property
    > > to mention it as pushbutton.In that case you can catch event as you do

    > with
    > > link button style. You can write code for EditCommand event handler.
    > > --
    > > Saravana
    > > Microsoft India Community Star,
    > > MCAD,SE,SD,DBA.
    > >
    > >
    > > "Mark" <> wrote in message
    > > news:...
    > > > Rather than using a LinkButton for "Edit" and "Delete" in my DataGrid,

    I
    > > > changed them to a PushButton style. How do you capture the event? It
    > > > doesn't appear to work like a LinkButton.
    > > >
    > > > Thanks in advance!
    > > > Mark
    > > >
    > > >

    > >
    > >

    >
    >
     
    Mark, Jul 3, 2003
    #4
    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. Mark
    Replies:
    1
    Views:
    478
  2. Curtis Hatter

    Solving DataGrid's PushButton Problem

    Curtis Hatter, Oct 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,869
  3. Nick Gilbert
    Replies:
    2
    Views:
    899
    Jeffrey Tan[MSFT]
    Dec 15, 2003
  4. Bryan G

    Coding a PushButton Event

    Bryan G, Apr 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    329
  5. Nick Gilbert
    Replies:
    4
    Views:
    255
    Jeffrey Tan[MSFT]
    Dec 16, 2003
Loading...

Share This Page