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. Advertisements

  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. Advertisements

  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. Advertisements

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. Balaji
    Replies:
    1
    Views:
    3,445
    Saravana
    Jun 26, 2003
  2. Mark
    Replies:
    6
    Views:
    715
    S. Justin Gengo
    Aug 3, 2003
  3. David Rose

    DataGrid edit events fire twice

    David Rose, Dec 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    802
    Microsoft
    Jan 13, 2004
  4. =?Utf-8?B?T2Zlcg==?=

    Causing events to fire in a datagrid

    =?Utf-8?B?T2Zlcg==?=, Apr 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    472
    =?Utf-8?B?T2Zlcg==?=
    Apr 5, 2005
  5. Replies:
    6
    Views:
    581
  6. Simon Storr

    Datagrid events refuse to fire

    Simon Storr, Jul 15, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    249
    Simon Storr
    Jul 15, 2003
  7. Jean-Pierre Fouche

    Dynamic Datagrid with TextBoxes Textchanged events wont fire

    Jean-Pierre Fouche, Jul 28, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    326
    Cristian Suazo
    Jul 29, 2003
  8. Chris

    Events Events Events Please Help

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