ItemCommand not working for Link Button on dynamically built grid

Discussion in 'ASP .Net Datagrid Control' started by RCorona, Dec 21, 2004.

  1. RCorona

    RCorona Guest

    I have a page that has one to many dynamically built datagrids on it. Each
    row in each grid has a link button. When you click the button the post back
    occurs but not the event handler for the button.

    As I build the grid I add the event handler like so:

    DataGrid dg = new DataGrid()
    dg.ItemCommand += new DataGridCommandEventHandler(dg_ItemCommand)
    ....

    Any ideas? I did try to override the OnBubbleEvent on the page but to no
    avail.

    Thanks
    RCorona, Dec 21, 2004
    #1
    1. Advertising

  2. RCorona

    Al Cadalzo Guest

    I'm having a similar problem trying to get a SortCommand event to fire on a
    dynamically added BoundColumn.
    Were you able to get your event handler to work?

    Thanks,
    Al


    "RCorona" <> wrote in message
    news:...
    >I have a page that has one to many dynamically built datagrids on it. Each
    > row in each grid has a link button. When you click the button the post
    > back
    > occurs but not the event handler for the button.
    >
    > As I build the grid I add the event handler like so:
    >
    > DataGrid dg = new DataGrid()
    > dg.ItemCommand += new DataGridCommandEventHandler(dg_ItemCommand)
    > ...
    >
    > Any ideas? I did try to override the OnBubbleEvent on the page but to no
    > avail.
    >
    > Thanks
    Al Cadalzo, Jan 1, 2005
    #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. Marina
    Replies:
    3
    Views:
    2,781
    Chad Crowder
    Feb 29, 2004
  2. Adam Knight
    Replies:
    1
    Views:
    2,794
    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=
    Feb 6, 2006
  3. RCorona

    ItemCommand on dynamically built DataGrid

    RCorona, Dec 21, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    109
    RCorona
    Dec 21, 2004
  4. RCorona

    ItemCommand on Dynamically built DataGrid not firing

    RCorona, Dec 21, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    140
    RCorona
    Dec 21, 2004
  5. Burak Gunay
    Replies:
    0
    Views:
    152
    Burak Gunay
    Jan 9, 2006
Loading...

Share This Page