|
|
|
start date: Mon, 13 Aug 2007 13:25:38 -0500,
posted on: microsoft.public.dotnet.framework.aspnet.webcontrols
back
| Thread Index |
|
1
Victor Rodriguez am
|
|
2
(Steven Cheng[MSFT])
|
|
3
Victor Rodriguez am
|
|
4
(Steven Cheng[MSFT])
|
|
5
Victor Rodriguez am
|
|
6
(Steven Cheng[MSFT])
|
info
How can I create a control that renders a <div></div> but contains for
example a gridview that I can edit its properties on design mode?
Thanks,
Victor
Date:Mon, 13 Aug 2007 13:25:38 -0500
Author:
|
RE: info
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}:DivGridView runat=server></{0}:DivGridView>")]
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.
Date:Tue, 14 Aug 2007 04:24:49 GMT
Author:
|
Re: info
I'm doing very good, thanks for asking, how are you?
I'll try that but I think I'll have to do some designers or something to
support what I'm envisioning.
Thanks,
Victor
"Steven Cheng[MSFT]" wrote in message
news:WmAoasi3HHA.360@TK2MSFTNGHUB02.phx.gbl...
> 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}:DivGridView runat=server></{0}:DivGridView>")]
> 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.
>
Date:Wed, 15 Aug 2007 14:50:30 -0500
Author:
|
Re: info
Thanks for your reply Victor.
I'm doing well. No problem, please feel free to discuss here if you meet
any further problem on this.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Thu, 16 Aug 2007 07:53:34 GMT
Author:
|
Re: info
I figured it out in a different way, simpler, I'm using a datarepeater with
a gridview inside and I created a class that inherits the gridview so that I
can capture the parent current key and pass it on to the gridview and filter
the gridview based on that. This way I can use the existing designers and
everything to customize my components in design mode.
Thanks,
Victor
"Steven Cheng[MSFT]" wrote in message
news:WsCxVq93HHA.5204@TK2MSFTNGHUB02.phx.gbl...
> Thanks for your reply Victor.
>
> I'm doing well. No problem, please feel free to discuss here if you meet
> any further problem on this.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
Date:Sat, 18 Aug 2007 12:02:06 -0500
Author:
|
Re: info
Thanks for your followup Victor,
Glad that you've found a solution. If possible, also welcome to share some
of your implementation here so that some other community members can also
benifit from it.
Thanks again for your posting!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 20 Aug 2007 02:26:41 GMT
Author:
|
|
|