5 Replies Latest reply on Feb 26, 2009 8:00 AM by nbelaevski

    scrollbar on datatable

    ajanz

      i try to add scrollbars on my datatable.

      my code is

       <rich:panel style="overflow:auto;width:780px" >
       <rich:dataTable value="#{Session.list}" var="wf" id="mytable"
       onRowMouseOver="this.style.backgroundColor='#FFFF99'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0"
       width="1200" border="0" >
      .
      .
      .
      
      


      why does it not work?

        • 1. Re: scrollbar on datatable
          nbelaevski

          Works for me without problems.

          • 2. Re: scrollbar on datatable
            ajanz

            here is the output of my page.

            why are there no scroll bars?

            <span id="wfindexform:GROUP_3" style="overflow-x: scroll; width: 100px;">
            <table id="wfindexform:TABLE_1" class="dr-table rich-table" cellspacing="0" cellpadding="0" border="0" style="width: 500px;">
            <colgroup span="4"/>
            <thead class="dr-table-thead">
            </thead>
            <tbody id="wfindexform:TABLE_1:tb">
            <tr class="dr-table-firstrow rich-table-
            
            


            • 3. Re: scrollbar on datatable
              nbelaevski

              Probably because of SPAN. It's illegal to put TABLE into SPAN element.

              • 4. Re: scrollbar on datatable
                ajanz

                ok my table was surrounded by a h:panelgroup.

                changed to rich:panel. now it works. i am only struggling with the padding...

                tried following in my css

                .no-padding {
                padding:0px;
                }

                dr-pnl-b {
                padding:0px;
                }

                rich-panel-body {
                padding:0px;
                }

                without success

                • 5. Re: scrollbar on datatable
                  nbelaevski

                  Hi,

                  Use Firebug or web developer toolbar to diagnose the problem.