ASP.NET GridView UserControl

J

JAWS

I want to make an ASP.NET user control with only a gridview on it.

My usercontrol must behave the same as a normal gridview, with some
extra
properties and methods (for security purposes, such as: invisible,
readonly etc..)

I can not inherit the gridview from webcontrols.gridview because this
causes an error.
(Compile error: "property 'SupportAutoEvents' cannot be declared
'Overrides' because it does not override a property in a base class"),
so I made my own properties and methods.

I can bind data to myGridView and this works fine, but when I want to
customize the columns (at run-time). Such as headertext, first column
invisible etc...
This is the property for the columns:

Property Columns(ByVal index As Integer) As
System.Web.UI.WebControls.DataControlField
Get
Return GridView1.Columns(index)
End Get
Set(ByVal value As System.Web.UI.WebControls.DataControlField)
GridView1.Columns(index).Visible = value.Visible
End Set
End Property

This doesn't work, can anyone tell me why?

How can I setup usercontrols with only 1 control and inherit all
properties, methods and events from this 'base' control, so I only have
to add my own properties?
This because I also have to make usercontrols of textbox, buttons
etc...

Thanx in advance...
 

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,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top