[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Designers Not Called for Child Controls

Mark Olbert

2/19/2007 5:30:00 AM

In design-mode, when my databound composite control creates its child controls and adds them to its control collection, the
designers for the newly-created child controls (which are also composite databound controls) don't get called.

Why is that? I thought the designer was always called when a child control is created at design time. How else will the GetHtml (I
forget the exact name of the method off-hand) method of the "outer" composite databound control "know" how to render its contents?

- Mark
3 Answers

wawang

2/20/2007 9:45:00 AM

0

Hi Mark,

Unfortunately, this is by design behavior: Child controls use their runtime
rendering in the designer since they don't even have designers created.
Only top-level controls have designers and thus have specialized
design-time rendering.

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Mark Olbert

2/20/2007 2:53:00 PM

0

Walter,

But, as I pointed out in a long reply to Steven here in another thread (Updating Custom Control at Design Time), not even the
run-time behavior works at design-time. For example, binding a child GridView control in the designer routines for a custom
composite control does not create any rows in the GridView.

Which is ridiculous. It significantly limits the utility of using things like GridViews to derive/create more sophisticated
controls. Why would such a limitation be put into them?

What does Microsoft recommend for displaying child controls, like GridView, at design time in composite controls?

- Mark

wawang

2/22/2007 4:02:00 AM

0

Hi Mark,

Yes I've been discussing with Steven about the other post. Currently he's
still performing further research on it.

I understand that currently custom composite server control does have
limited designer support for constituent control. We're sorry for the
inconvenience caused. Steven and I are currently discussing with product
team on these related topics now. Your feedback is surely taken seriously.
Thank you!

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.