Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > user control in a datagrid does not work with a delegate and event

Thread Tools

user control in a datagrid does not work with a delegate and event

David Cho
Posts: n/a
Hi, I have a user control that raises an event which works perfectly
outside a datagrid. But trying to do this within a datagrid causes
some problems.

Here is what I have. For the given datagrid, in the event handler for
ItemDataBound, I have

enable_disable userContentEnableDisable =
(enable_disable)e.Item.FindControl("userContentEna bleDisable");

//tying handler to the event
userContentEnableDisable.OnSelectionModeChange += new
enable_disable.SelectionModeChangeHandler(userCont entEnableDisable_OnSelectionModeChange);

Then when I perform an action that raises an event, I get the

Again, this user control's delegate and event work without a problem
outside the datagrid. Any ideas?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic loaded ascx delegate event not firing in parent form ASP .Net Building Controls 1 09-12-2008 06:20 PM
dynamic loaded datalist ascx event delegate not firing in parent f cindy ASP .Net 0 09-09-2008 04:16 PM
Dynamic loaded control event delegate does not fire on server cindy ASP .Net Web Controls 0 09-08-2008 03:28 AM
Method does not have the same signature as delegate ASP .Net 1 09-19-2005 12:50 PM
OnSelectedIndexChanged event does not work with the selection on the checkbox ( on the cell of Datagrid control ) ? bienwell ASP .Net 2 03-09-2005 02:33 PM