Loading ...
Sorry, an error occurred while loading the content.

Re: DataTable Paginator containers problem

Expand Messages
  • y_lsmith
    Anthony, The DataTable constructor will blow away the content of its container node during construction, so by the time the Paginator needs to render, the div
    Message 1 of 4 , Feb 29, 2008
    • 0 Attachment
      Anthony,

      The DataTable constructor will blow away the content of its container
      node during construction, so by the time the Paginator needs to
      render, the div actionButtonsMarkupContainer is no longer in the DOM.

      You'll need to supply a container outside that which the DataTable
      will use as its content container.

      Hope this helps,
      Luke


      --- In ydn-javascript@yahoogroups.com, "agladdish" <agladdish@...> wrote:
      >
      > Hi List,
      >
      > Am having problems getting my DataTable Paginator to render the
      > template links in the div element set in 'containers'.
      > Am using YUI 2.5.0.
      >
      > Re code below, can anyone spot what I'm doing wrog?
      >
      > Thanks,
      > Anthony
      [snip]
    • agladdish
      ... Hi Luke, that makes sense. However, I m trying to place my Paginator s template buttons in the table s section. Can you suggest a way to accomplish
      Message 2 of 4 , Feb 29, 2008
      • 0 Attachment
        > The DataTable constructor will blow away the content of its container
        > node during construction, so by the time the Paginator needs to
        > render, the div actionButtonsMarkupContainer is no longer in the DOM.
        >
        > You'll need to supply a container outside that which the DataTable
        > will use as its content container.

        Hi Luke, that makes sense.
        However, I'm trying to place my Paginator's template buttons in the
        table's <tfoot> section.
        Can you suggest a way to accomplish this, or must it go in a element
        container outside the table itself?

        Thanks for your help!

        Anthony
      • y_lsmith
        ... You ll need to create the Paginator in an element outside the DataTable s container. However, the Paginator supports containers that are not attached to
        Message 3 of 4 , Mar 4, 2008
        • 0 Attachment
          > Hi Luke, that makes sense.
          > However, I'm trying to place my Paginator's template buttons in the
          > table's <tfoot> section.
          > Can you suggest a way to accomplish this, or must it go in a element
          > container outside the table itself?
          >
          > Thanks for your help!
          >
          > Anthony
          >


          You'll need to create the Paginator in an element outside the DataTable's container.  However, the Paginator supports containers that are not attached to the DOM.  So you can use document.createElement('div') to create a div in code, assign that as the Paginator's container, then after the DataTable has rendered, add a tfoot, tr, and td to the DataTable's body table, and insert the div into the td.

          I threw together this example  for you.


          Hope this helps,
          Luke
        Your message has been successfully submitted and would be delivered to recipients shortly.