Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Rendering DataGrid in a custom control at design time

Reply
Thread Tools

Rendering DataGrid in a custom control at design time

 
 
Sam Fields
Guest
Posts: n/a
 
      01-15-2004
I have built custom controls that inherit from the HtmlTable control so that
they will render properly at design time. I am using a designer, since for
some reason an Html control without a designer gives ID problems. My
designer is simple:

internal class StandardHtmlControlDesigner : ControlDesigner
{
public override string GetDesignTimeHtml()
{
return base.GetDesignTimeHtml();
}
}

This works very well. Also, when building the inherited controls
themselves, I am using the following directives:

[Designer(typeof(Design.StandardHtmlControlDesigner ), typeof(IDesigner))]
[PersistChildren(false)]
[PersistenceMode(PersistenceMode.InnerDefaultProper ty)]
[ParseChildren(true)]

So that it will properly parse and render the children with the custom table
is rendered. This renders every control correctly, EXCEPT the datagrid
control. I want to use the .NET <aspataGrid>, but for some reason the
CreateControlHierarchy(false) is never called during the rendering of the
datagrid. The is not affecting the browser output, I just want it to render
at design time properly with the columns filled out like a default DataGrid
control would be (with 5 rows, and "DataBound" rendered in the databound
columns).

Can anyone tell me how to hook into the DataGrid control (I'm assuming via
my designer) to tell it to create the non-bound control hierarchy?

Thanks!
Sam Fields



 
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
Rendering Custom Control during design time Joey Lee ASP .Net Building Controls 2 07-01-2005 03:35 AM
Design time rendering of a composite custom web control Barry Carr ASP .Net 4 01-15-2004 09:03 PM
Rendering DataGrid in a custom control at design time Sam Fields ASP .Net Web Controls 0 01-15-2004 08:08 PM
Rendering DataGrid in a custom control at design time Sam Fields ASP .Net Building Controls 0 01-15-2004 07:41 PM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com ASP .Net 0 07-01-2003 09:26 PM



Advertisments