Inheriting from GridView

Discussion in 'ASP .Net Web Controls' started by Greg, Mar 14, 2007.

  1. Greg

    Greg Guest

    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
     
    Greg, Mar 14, 2007
    #1
    1. Advertising

  2. Greg

    bugmenot Guest

    Greg;7385764 Wrote:
    > 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?


    --
    bugmenot
     
    bugmenot, Mar 28, 2007
    #2
    1. Advertising

  3. Greg

    Guest

    On Mar 14, 1:26 pm, Greg <> wrote:
    > 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!
     
    , Mar 28, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne J
    Replies:
    2
    Views:
    364
    John Saunders
    Oct 24, 2003
  2. Joel Barsotti
    Replies:
    4
    Views:
    2,235
    Joel Barsotti
    Oct 30, 2003
  3. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    18,046
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  4. =?Utf-8?B?V2ViTWF0cml4?=

    Creating custom gridview (inheriting from gridview class)

    =?Utf-8?B?V2ViTWF0cml4?=, Oct 21, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    581
    =?Utf-8?B?RGFsZQ==?=
    Oct 22, 2006
  5. Andrew Robinson

    Inheriting from a GridView

    Andrew Robinson, Feb 12, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    673
    Steven Cheng[MSFT]
    Feb 16, 2007
Loading...

Share This Page