How to take the edge of a primefaces datagrid?

Asked

Viewed 2,527 times

2

How do I take the edge of a primefaces datagrid???

follows the part of the code I use the datagrid:

<p:dataGrid columns="3" value="#{projetistaBean.listaDeProjetistas}" var="projetista" styleClass="ui-datagrid"  >

and the part of the code that I customize the datagrid:

.ui-datagrid{
    border: none;
}

and nothing from the edge

4 answers

1

Try to remove the edge of the ui-datagrid and of ui-datagrid-content

<style>
    .ui-datagrid{border: none !important;}  
    .ui-datagrid-content {border: none !important;}  
</style>
  • that’s what I did. But it doesn’t work. I then added: . ui-datagrid tr{ border: None ! Important; }

  • the problem is that I can take the borders of the rows and columns of the datagrid, but the general component (the border that surrounds the whole datagrid) does not come out

  • Try this other way... (see amendment)

0

Amazing that I never had to do this, but 2 hours after seeing this question came the need, :).

I solved the problem as follows:

 <p:dataGrid ... styleClass="teste">
    ...
 </p:dataGrid>

In the file with the styles:

.teste .ui-widget-content
{
    border: none !important;
}

I hope it helps.

0

Simple,

.ui-panelgrid td, .ui-panelgrid tr{ border: none !important;" }

0

Modifying the class . ui-datagrid you end up changing for everyone, but if you want to change only a specific single do so:

<style>
    .noGridBorder tr, .noGridBorder td{border: none!important}
</style>

<p:panelGrid styleClass="noGridBorder">
</p:panelGrid>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.