I have subclassed the ASP.NET Panel control to customise the rendering of the GroupingText. However, while it appears fine in the final output, it is not appearing correctly in the designer.
A sample of what I am doing follows:
Is there anything else I need to do to make it appear correctly in the designer?
Imports System.Web.UI
Public Class CustomPanel
Inherits Panel
Public Overrides Sub RenderBeginTag(ByVal writer As System.Web.UI.HtmlTextWriter)
Me.AddAttributesToRender(writer)
Dim tagKey As HtmlTextWriterTag = Me.TagKey
If (tagKey <> HtmlTextWriterTag.Unknown) Then
writer.RenderBeginTag(tagKey)
Else
writer.RenderBeginTag(Me.TagName)
End If
Dim groupingText As String = Me.GroupingText
If ((groupingText.Length <> 0) AndAlso Not TypeOf writer Is Html32TextWriter) Then
writer.AddAttribute("class", "heading")
writer.RenderBeginTag(HtmlTextWriterTag.Div)
writer.Write(groupingText)
writer.RenderEndTag()
End If
End Sub
End Class