LinkButton works but PushButton does not

Discussion in 'ASP .Net Datagrid Control' started by EricT, Apr 19, 2004.

  1. EricT

    EricT Guest

    I have a datagrid with a LinkButton. When user clicks the hyperlink, the
    ItemCommand event handler gets callled. I used Property Builder to change
    the Button Type to ButtonCommand, and refreshed the we page. Clicking the
    button does not fire the ItemCommand handler.

    Any suggestions?

    EricT
     
    EricT, Apr 19, 2004
    #1
    1. Advertising

  2. EricT

    EricT Guest

    Can someone help with this please?


    "EricT" <> wrote in message
    news:...
    > I have a datagrid with a LinkButton. When user clicks the hyperlink, the
    > ItemCommand event handler gets callled. I used Property Builder to change
    > the Button Type to ButtonCommand, and refreshed the we page. Clicking the
    > button does not fire the ItemCommand handler.
    >
    > Any suggestions?
    >
    > EricT
    >
    >
     
    EricT, Apr 20, 2004
    #2
    1. Advertising

  3. In your initializeComponent function, what is the buttoncommand hooked to?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/27cok
    "EricT" <> wrote in message
    news:%23y%...
    > Can someone help with this please?
    >
    >
    > "EricT" <> wrote in message
    > news:...
    >> I have a datagrid with a LinkButton. When user clicks the hyperlink, the
    >> ItemCommand event handler gets callled. I used Property Builder to change
    >> the Button Type to ButtonCommand, and refreshed the we page. Clicking the
    >> button does not fire the ItemCommand handler.
    >>
    >> Any suggestions?
    >>
    >> EricT
    >>
    >>

    >
    >
     
    Alvin Bruney [MVP], Apr 20, 2004
    #3
  4. EricT

    EricT Guest

    Alvin,
    Thanks for the reply.
    this.DataGrid1.ItemCommand += new
    System.Web.UI.WebControls.DataGridCommandEventHandler(this.DataGrid1_ItemCom
    mand);

    I figured out how to make my app work: I stopped reloading the DataGrid's
    data on postback. Now the ItemCommand even fires when the pushButton is
    clicked. What still puzzles me is why the event fired for linkButton and
    didn't fire for pushButton.

    et

    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    news:...
    > In your initializeComponent function, what is the buttoncommand hooked to?
    >
    > --
    > Regards,
    > Alvin Bruney [ASP.NET MVP]
    > Got tidbits? Get it here...
    > http://tinyurl.com/27cok
    > "EricT" <> wrote in message
    > news:%23y%...
    > > Can someone help with this please?
    > >
    > >
    > > "EricT" <> wrote in message
    > > news:...
    > >> I have a datagrid with a LinkButton. When user clicks the hyperlink,

    the
    > >> ItemCommand event handler gets callled. I used Property Builder to

    change
    > >> the Button Type to ButtonCommand, and refreshed the we page. Clicking

    the
    > >> button does not fire the ItemCommand handler.
    > >>
    > >> Any suggestions?
    > >>
    > >> EricT
    > >>
    > >>

    > >
    > >

    >
    >
     
    EricT, Apr 20, 2004
    #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:
    474
  2. Nick Gilbert
    Replies:
    2
    Views:
    889
    Jeffrey Tan[MSFT]
    Dec 15, 2003
  3. Sathyaish
    Replies:
    3
    Views:
    3,108
    Sathyaish
    Sep 8, 2005
  4. =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=

    Help on LinkButton vs PushButton ??

    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=, Jan 13, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,722
    S. Justin Gengo [MCP]
    Jan 13, 2006
  5. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    187
    Sathyaish
    Sep 8, 2005
Loading...

Share This Page