Isn't DataGrid.Render(writer) supposed to automatically call RenderBeginTag(writer) and RenderEndTag

H

Henri

Hi,

I'm trying to customize a DataGrid adding custom rows before the endTag
</TABLE>, and also some html before and after the control itself.
So I wrote :

'************************************************************
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

writer.Write("html to render before base control")

MyBase.Render(writer)

writer.Write("html to render after base control")

End Sub
'************************************************************
Public Overrides Sub RenderEndTag(ByVal writer As HtmlTextWriter)

writer.Write("html to render before base control's closing tag")

MyBase.RenderEndTag(writer) 'supposed to write </TABLE>

End Sub

But it doesn't work as RenderEndTag si never called by
MyBase.Render(writer).
So what's RenderEndTag() for then if it's not always called by default by
the Render method?
Did I miss something?
How can I write something before DataGrid's </TABLE> then?

Thank for your help

Henri
 

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

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top