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

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

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

    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




    Henri Guest

  2. Similar Questions and Discussions

    1. CF7 Report Writer
      I'm heavily into developing reports with the new report writer as a convert from Crystal Reports. I'd like to report any bugs/problems I find with...
    2. PDF Writer
      Hi, I have had to reinstall my Acrobat Version 5. Previously when I clicked on print I would be offered a choice of using PDF writer or distiller....
    3. Writer not working
      I installed acrobat 5.05 and my applications say that the writer is not installed. Is that a separate process. The instructions that say I can...
    4. CD Writer
      Anyone know of any manufacturers of external CD writers for a Blade2000 running Solaris8 thanks
    5. Sharing CD Writer
      Now I've resolved all my networking problems, can I write files from my laptop directly to the CD writer on my desktop over the network? Phil
  3. #2

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

    It's OK, I finally understood my mistake by myself! :-)

    Henri

    "Henri" <hmfireball@hotmail.com> a écrit dans le message de
    news:e5fJ5oQaEHA.3756@tk2msftngp13.phx.gbl...
    > 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
    >
    >
    >
    >
    >


    Henri Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139