Derived DataGrid & Active Schema Issue
-
I have created a custom web control that inherits from datagrid. It provides sorting on any data bound to it and allows for up & down arrows in column headers when a column is sorted depending on direction (asc/desc). This all works fine. However, when i place the control on a Web Form and try to add some columns EG:
<Columns> <asp:ButtonColumn Text="Button"></asp:ButtonColumn > </Columns>
Visual studio underlines the start tags in red with the messages: "The active schema does not support the element 'Columns'." and "The active schema does not support the element 'asp:ButtonColumn'." The code still runs fine, but intellisense is lost within studio. Within the original datagrid these tags are related to properties IE the Columns tag relates to the Column property etc.. and Visual studio knows what to do with these through attributes such as 'PersistenceModeAttribute'. I would have thought these would also have been inherited from the datagrid into my control, but these does not seem to be the case. I have tried overriding these Properties from within my control and adding attributes but this does not work/i don't know the correct attribute!! Another point to note is that when you open a tag within a datagrid tag in Visual studio, your options are limited (Columns, EditItemStyle etc..), however, within mine Studio pops up the usual list as with the root of the form (a, acronym etc..). I'd obviously like the earlier behavior in my control too. If anyone can help me make studio behave i'd be very appreciative.