I am trying to create a custom gridview control that has customisable columns.
I want to be able to use the the control as I would any other gridview except a couple of extra methods and properties and when I call -
it uses a mapping function created by me to return the correct column.
But when I call
it returns the column collection from the base gridview class.
I think I have achieved that using -
In the new in the new CustomGridview class deriving from the Gridview class.
But when I attempt to use this class as a control on the page I get a errors
"Ambigous match found"
and
"Type 'System.Web.UI. WebControls.Cus tomisedGridview ' does not have a public property named 'TemplateField' ."
for each element inside the <columns> tag.
What am I doing wrong? How can I get it to use the original columns collection for the <columns> tag on the page?
I want to be able to use the the control as I would any other gridview except a couple of extra methods and properties and when I call -
Code:
CustomGridview.Columns(10)
But when I call
Code:
CustomGridview.Columns()
I think I have achieved that using -
Code:
Public Overloads ReadOnly Property Columns(ByVal Index As Integer) As DataControlField
Get
Return SomeMappingFunction(Index)
End Get
End Property
But when I attempt to use this class as a control on the page I get a errors
"Ambigous match found"
and
"Type 'System.Web.UI. WebControls.Cus tomisedGridview ' does not have a public property named 'TemplateField' ."
for each element inside the <columns> tag.
What am I doing wrong? How can I get it to use the original columns collection for the <columns> tag on the page?