1 Reply Latest reply on Aug 17, 2007 4:35 AM by Tomislav Tkal?evi?

    scroll bar datatable

    haoues klklk Newbie

      Hi,

      Is it possible to add a scroll bar to a datatable using css ?

      Thanks in advance and sorry if this question has already been treated.

        • 1. Re: scroll bar datatable
          Tomislav Tkal?evi? Novice

           

          "haoues01" wrote:
          Hi,

          Is it possible to add a scroll bar to a datatable using css ?

          Thanks in advance and sorry if this question has already been treated.

          Yes it is.

          I auctally saw this example here


          First I have made css rule like this:
          .panelDatatable {
          overflow: auto;
          width: 96%;
          height: 500px;
          }

          and after that put rich:panel as a container for a datatable which has a bodyClass panelDatatable.
          <r:panel bodyClass="panelDatatable">
           <r:dataTable id="tablica" width="100%" rows="20"
           onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
           onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
           cellpadding="0" cellspacing="0" var="v" rowKeyVar="rb"
           value="#{someBean.someCollectionvalue}">
          


          If your datatable exceds css rules then property overflow=auto will add scrollers to panel