This content has been marked as final.
Show 1 reply
-
1. Re: scroll bar datatable
tkalactomo Aug 17, 2007 4:35 AM (in response to haoues01)"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