Hi all,
I want to override the GridView control so that the only html output
in the <tabledeclarati on is:
<table id="tableID">
I don't want the "border" or "rules" or "style" attributes to appear.
I'd like to override the GridView control for my entire project, so I
attempted to add a class to override the control and then added
tagMapping to the web.config as follows...
Public Class ClearGridView
Inherits System.Web.UI.W ebControls.Grid View
Public Overrides Property BorderWidth() As
System.Web.UI.W ebControls.Unit
Get
If MyBase.BorderWi dth.IsEmpty Then
Return Unit.Pixel(0)
Else
Return MyBase.BorderWi dth
End If
End Get
Set(ByVal value As System.Web.UI.W ebControls.Unit )
MyBase.BorderWi dth = value
End Set
End Property
End Class
and in the web.config ...
<tagMapping>
<add tagType="System .Web.UI.WebCont rols.GridView"
mappedTagType=" myProject.Clear GridView"/>
</tagMapping>
I was hoping that might remove the "border-width:0px" part
when I add "BorderWidt h=0" as a starting point but it seemed to
have no effect.
Anyone any tips on how I could achieve what I want to do?
Thanks.
--
_______________ _______________ ________
www.globenotes.com/member/peterforan/
I want to override the GridView control so that the only html output
in the <tabledeclarati on is:
<table id="tableID">
I don't want the "border" or "rules" or "style" attributes to appear.
I'd like to override the GridView control for my entire project, so I
attempted to add a class to override the control and then added
tagMapping to the web.config as follows...
Public Class ClearGridView
Inherits System.Web.UI.W ebControls.Grid View
Public Overrides Property BorderWidth() As
System.Web.UI.W ebControls.Unit
Get
If MyBase.BorderWi dth.IsEmpty Then
Return Unit.Pixel(0)
Else
Return MyBase.BorderWi dth
End If
End Get
Set(ByVal value As System.Web.UI.W ebControls.Unit )
MyBase.BorderWi dth = value
End Set
End Property
End Class
and in the web.config ...
<tagMapping>
<add tagType="System .Web.UI.WebCont rols.GridView"
mappedTagType=" myProject.Clear GridView"/>
</tagMapping>
I was hoping that might remove the "border-width:0px" part
when I add "BorderWidt h=0" as a starting point but it seemed to
have no effect.
Anyone any tips on how I could achieve what I want to do?
Thanks.
--
_______________ _______________ ________
www.globenotes.com/member/peterforan/
Comment