EventHandler needs to be registered with the PostBack.
What interfaces are you implementing - IPostBackDataHandler /
IPostBackEventHandler / both?
How are you handling them?
--
Cheers,
Gaurav Vaish
http://mastergaurav.org
http://www.edujini.in
-------------------------------
To Hell with Murphy's Law.. When things go broke, FIX Them
-------------------------------
Sorry for the delay, I never got an email reply...
Here is what the control structure looks like:
Parent Webcontrol A
|___Collection of Type WebControl B
|__WebControl B
|__ImageButton (sink click event)
For Parent Webcontrol A : WebControl, INamingContainer
For Collection [Serializable()] : Collectionbase
For Webcontrol B : WebControl, IPostBackDataHandler, ICell, INamingContainer
I have a custom typeconverter for both the collection and Webcontrol B. The
typeconverter for the collection works fine but I lose which item (Webcontrol
B) was clicked. Also I can never debug break on SaveViewstate or
LoadViewstate for Webcontrol B.
> EventHandler needs to be registered with the PostBack.
>
[quoted text clipped - 10 lines]
> To Hell with Murphy's Law.. When things go broke, FIX Them
> -------------------------------
Gaurav Vaish (EduJini.IN) - 19 May 2006 19:20 GMT
> For Webcontrol B : WebControl, IPostBackDataHandler, ICell,
> INamingContainer
Looks something fishy in IPostBackDataHandler
And/Or the event that you have exposed
+
How you have added the handler.
May be u can post the content or mail me at
gaurav~DOT~vaish~AT~gmail~DOT~com

Signature
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
Chris A. - 19 May 2006 21:49 GMT
In my custom collection I create a delegate for the CellInfoEventHandler when
each SimpleCell is added to the collection:
protected override void OnInsert(int index, object value)
{
SimpleCell cell = (SimpleCell) value;
cell.OnClick += new CellInfoEventHandler(cell_OnClick);
//base.OnInsert (index, value);
}
I can debug and confirm that the SimpleCell exists and is added to the
collection but when I place a breakpoint on the SimpleCell overriden
SaveViewstate() and LoadViewstate() methods it never breaks into these
methods. Obviously the RegisterChildControls and RenderContents methods get
called as each SimpleCell is rendered on the design-time surface and in the
run-time aspx.
Note that I have a custom typeconverter for the SimpleCellCollection and the
SimpleCell. I have looked at the hidden Form values __EVENTTARGET and
__EVENTTARGET to view which SimpleCell has been clicked (essentially each is
an ImageButton). Any more ideas as to what is happening? Much thanks.
> > For Webcontrol B : WebControl, IPostBackDataHandler, ICell,
> > INamingContainer
[quoted text clipped - 7 lines]
> May be u can post the content or mail me at
> gaurav~DOT~vaish~AT~gmail~DOT~com
Gaurav Vaish (EduJini.IN) - 23 May 2006 18:42 GMT
Can you post / upload the complete code somewhere...
or may be mail us at consulting~AT~edujini~DOT~in
We should be able to provide some info....

Signature
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
> In my custom collection I create a delegate for the CellInfoEventHandler
> when
[quoted text clipped - 34 lines]
>> May be u can post the content or mail me at
>> gaurav~DOT~vaish~AT~gmail~DOT~com
Chris A. - 23 May 2006 20:23 GMT
Gaurav,
Thanks for your reply but is your assistance contingent upon a consulting
fee? I note that you are now using consulting@edujini.in versus
gaurav.vaish@gmail.com. Please let me know before I forward you the project.
> Can you post / upload the complete code somewhere...
>
[quoted text clipped - 39 lines]
> >> May be u can post the content or mail me at
> >> gaurav~DOT~vaish~AT~gmail~DOT~com
Gaurav Vaish (EduJini.IN) - 25 May 2006 06:30 GMT
> Thanks for your reply but is your assistance contingent upon a consulting
> fee? I note that you are now using consulting@edujini.in versus
> gaurav.vaish@gmail.com. Please let me know before I forward you the
> project.
No. No fee, at least for the first query / solution. :-)
If you forward it to consulting~AT~..., there may be more people than just
me to work on it. :)
If you forward is to gaurav~DOT~..., I'll manually forward it to
consulting~AT~...
A request... please do not write our complete email address. They get
abused.

Signature
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------