Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Problem with ControlDesigner and GetDesignTimeHtml

Reply
Thread Tools

Problem with ControlDesigner and GetDesignTimeHtml

 
 
Nicolas LeBlanc
Guest
Posts: n/a
 
      07-29-2004
Hello,

I'm trying to do a control that does an html table around other controls, it
works 100% fine, but I have decided to implement design time viewing, now
I'm in trouble.

It works, but it does not render any nested controls inside my control
(which inherits from a Panel), so no child controls are rendered in design
time at all.

Of course, if I don't use a designer, I have the standard Panel behavior,
but this is not what I want, I want to see my html table rendered and the
content inside the panel rendered too.

There are very few examples on the web, and I have yet to see anybody doing
a GetDesignTimeHtml method that, for exemple, render a datagrid inside it...

Can anybody help? This is not really needed, but design time viewing is
pretty useful.

Thanks.


 
Reply With Quote
 
 
 
 
Dale
Guest
Posts: n/a
 
      07-30-2004
You can use the DataGridDesigner class to provide functionality similar to
the default designer action in Visual Studio.

If you just want to render a simulation of a DataGrid, you should emulate
the HTML that is rendered to the browser by ASP.NET. Something I do is to
open the source view of the control as rendered in a browser, and then wrap
the rendered HTML in a StringBuilder or TextWriter to collect the HTML and
return it as the result of the GetDesignTimeHtml.

You can use the GetDesignTimeDataSource to return a collection that can be
used to provide designtime data for your datagrid.


Dale Preston
MCAD, MCSE, MCDBA

"Nicolas LeBlanc" <> wrote in message
news:...
> Hello,
>
> I'm trying to do a control that does an html table around other controls,

it
> works 100% fine, but I have decided to implement design time viewing, now
> I'm in trouble.
>
> It works, but it does not render any nested controls inside my control
> (which inherits from a Panel), so no child controls are rendered in design
> time at all.
>
> Of course, if I don't use a designer, I have the standard Panel behavior,
> but this is not what I want, I want to see my html table rendered and the
> content inside the panel rendered too.
>
> There are very few examples on the web, and I have yet to see anybody

doing
> a GetDesignTimeHtml method that, for exemple, render a datagrid inside

it...
>
> Can anybody help? This is not really needed, but design time viewing is
> pretty useful.
>
> Thanks.
>
>



 
Reply With Quote
 
 
 
Reply

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
ControlDesigner does not "repaint" control when properties are changed Vincent Scheel ASP .Net 0 03-20-2006 07:21 AM
Force new call to GetDesignTimeHtml Joshua Flanagan ASP .Net 0 01-04-2006 12:54 AM
How to get parent/controldesigner of STANDARD webcontrol =?Utf-8?B?S0NT?= ASP .Net 0 09-21-2005 11:05 PM
GetDesignTimeHtml() is never called in ReadWriteControlDesigner Luciano Bargmann ASP .Net Building Controls 2 09-16-2005 10:28 AM
GetDesignTimeHTML doesn't fire for PanelDesigner. Steve Wesorick ASP .Net Building Controls 3 01-28-2004 03:20 PM



Advertisments