Hi Victor,
Glad to see you again, how are you doing?
Regarding on the creating a custom control contains GridView(with
design-time support) question, based on my experience, it would be
difficult to do through defining a new custom web server control and make
GridView as a nested child control. This is because in such case, we'll
need to do the design-time work ourself for the custom control.
So far what I can get is define a custom web control which inherit the
built-in GridView control and override the "RenderControl" method to add
some customized wrapper html elements. e.g.
[ToolboxData("<{0}
ivGridView runat=server></{0}
ivGridView>")]
public class DivGridView : GridView
{
public override void RenderControl(HtmlTextWriter writer)
{
writer.RenderBeginTag("div");
writer.AddAttribute(HtmlTextWriterAttribute.Id, "divGrid");
writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundColor,
"yellow");
base.RenderControl(writer);
writer.RenderEndTag();
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<
Does this help for your scenario?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.