Inheriting from GridView

G

Greg

I'm building a custom web control that inherits from asp.net GridView
control. I'm expecting that when the control is inserted into a page its
design time behavior is the same as GridView but it is not. Here is what I
mean:

<Custom:CustomGridView ID="gv" runat="server">
<Columns>

</Columns>
</Custom:CustomGridView>

When I try to insert another tag between the custom grid view the designer
correctly shows the list of available options like AlternatinRowStyle,
Columns, etc. So I insert Columns tag. But when I try to insert a tag between
Columns tag the designer doesn't give any choices. Has anyone run into
similar issue with the GridView or other controls? Do I need to tinker with
any Attributes?

I appreciate any help
 
B

bugmenot

Greg;7385764 said:
When I try to insert another tag between the custom grid view the
designer
correctly shows the list of available options like AlternatinRowStyle,
Columns, etc. So I insert Columns tag. But when I try to insert a tag
between
Columns tag the designer doesn't give any choices. Has anyone run into
similar issue with the GridView or other controls? Do I need to tinker
with
any Attributes?

I'm having the same problem. Any ideas anyone?
 
M

maydaytxjunk

I'm building a custom web control that inherits from asp.net GridView
control. I'm expecting that when the control is inserted into a page its
design time behavior is the same as GridView but it is not. Here is what I
mean:

<Custom:CustomGridView ID="gv" runat="server">
<Columns>

</Columns>
</Custom:CustomGridView>

When I try to insert another tag between the custom grid view the designer
correctly shows the list of available options like AlternatinRowStyle,
Columns, etc. So I insert Columns tag. But when I try to insert a tag between
Columns tag the designer doesn't give any choices. Has anyone run into
similar issue with the GridView or other controls? Do I need to tinker with
any Attributes?

I appreciate any help

I am having the same problem. The design-time support only works for
nested items that are direct children of the inherited GridView; such
as <AlternatingRowStyle, Columns, EditRowStyle, etc. However, it works
fine when compiled and run. Any help on this would be great!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top