Datagrid events refuse to fire (pt 2)

S

Simon Storr

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
 
J

Jeff Tolman

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
(e-mail address removed)
 
S

Simon Storr

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top