Datagrid events refuse to fire (pt 2)

Discussion in 'ASP .Net Datagrid Control' started by Simon Storr, Jul 16, 2003.

  1. Simon Storr

    Simon Storr Guest

    Further to my earlier post the following events DO fire -

    ItemDataBound
    ItemCreated
    DataBinding
    Load
    PreRender
    UnLoad

    and the following DON'T -

    EditCommand
    Init
    ItemCommand
    SelectedIndexChanged
    Disposed

    Has anyone got any thoughts? I don't understand why it works in a normal
    aspx page, but not a usercontrol.

    Simon
    Simon Storr, Jul 16, 2003
    #1
    1. Advertising

  2. Simon Storr

    Jeff Tolman Guest

    I've had similar problems with events not firing, usually for Button objects
    within a Datagrid. Once I changed them to LinkButtons the events would
    fire. However, I'm not sure why this is (perhaps a bug?). Do you have any
    columns in your datagrid setup as Button objects?

    Jeff Tolman
    E&M Electric


    "Simon Storr" <> wrote in message
    news:OK$...
    > Further to my earlier post the following events DO fire -
    >
    > ItemDataBound
    > ItemCreated
    > DataBinding
    > Load
    > PreRender
    > UnLoad
    >
    > and the following DON'T -
    >
    > EditCommand
    > Init
    > ItemCommand
    > SelectedIndexChanged
    > Disposed
    >
    > Has anyone got any thoughts? I don't understand why it works in a normal
    > aspx page, but not a usercontrol.
    >
    > Simon
    >
    >
    Jeff Tolman, Jul 16, 2003
    #2
    1. Advertising

  3. Simon Storr

    Simon Storr Guest

    hi Jeff,
    I've now fixed the problem with the EditCommand - I explicitly set the
    grid's DataSource and DataBind() the grid in the UserControl's Init
    function. I am using an image for the edit button btw, by setting the 'Edit
    Text' to <img alt='Edit' src=edit.gif border=0 />.

    I still can't get the sorting event to fire though :eek:( - it does seem like a
    bug with usercontrols maybe, as my test app on a simple aspx page works
    fine? I tried just having LinkButtons but the sort events still won't go :eek:(

    Thanks,

    Simon

    "Jeff Tolman" <> wrote in message
    news:...
    > I've had similar problems with events not firing, usually for Button

    objects
    > within a Datagrid. Once I changed them to LinkButtons the events would
    > fire. However, I'm not sure why this is (perhaps a bug?). Do you have

    any
    > columns in your datagrid setup as Button objects?
    >
    > Jeff Tolman
    > E&M Electric
    >
    >
    > "Simon Storr" <> wrote in message
    > news:OK$...
    > > Further to my earlier post the following events DO fire -
    > >
    > > ItemDataBound
    > > ItemCreated
    > > DataBinding
    > > Load
    > > PreRender
    > > UnLoad
    > >
    > > and the following DON'T -
    > >
    > > EditCommand
    > > Init
    > > ItemCommand
    > > SelectedIndexChanged
    > > Disposed
    > >
    > > Has anyone got any thoughts? I don't understand why it works in a normal
    > > aspx page, but not a usercontrol.
    > >
    > > Simon
    > >
    > >

    >
    >
    Simon Storr, Jul 16, 2003
    #3
    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. wolf

    Why connet refuse??

    wolf, Feb 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    639
  2. Bisser Milanov

    Re: Debuger suddenly refuse to debug

    Bisser Milanov, Jun 26, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    398
    Ken Cox [Microsoft MVP]
    Jun 26, 2003
  3. Peter Row
    Replies:
    0
    Views:
    344
    Peter Row
    Mar 4, 2004
  4. Replies:
    6
    Views:
    435
  5. Simon Storr

    Datagrid events refuse to fire

    Simon Storr, Jul 15, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    139
    Simon Storr
    Jul 15, 2003
Loading...

Share This Page