How can I disable .ui-selected style when I set selectionMode="single" in p:datatable?
I want only highlight row OnMouseOver event. Is any way to do this?
How to disable .ui-selected style
This should do it:
Code: Select all
.ui-datatable .ui-datatable-data tr.ui-state-highlight.ui-selected {
background: white;
}
yes, but when I click on a row, he changes color to the one that I set.
All the time is set to this color, because it is selected.
and do not highlight when the mouse is over that row
Here is my css:
All the time is set to this color, because it is selected.
and do not highlight when the mouse is over that row
Here is my css:
Code: Select all
.ui-state-highlight {
border: 1px solid;
background: #ECF9FF;
}
.ui-datatable .ui-datatable-data tr.ui-state-highlight.ui-selected {
background: white;
}
td {
cursor: default;
}
my mistake, try this also (I don't think my choice of colour is that great!):
Code: Select all
.ui-datatable .ui-datatable-data tr.ui-state-highlight {
background: #dfdfdf;
}
How bout this one
you can change to others color.
well i go deep through the datatable.js
the mechanism addClass removeClass toggleClass is using jQuery
hope it helps
you can change the color in your own.
Code: Select all
.ui-datatable tr.ui-state-highlight {
cursor: pointer;
background: green;
}
.ui-datatable tr {
background: white;
border-color: #ddd;
}
.ui-datatable tr.ui-selected {
background: white;
border-color: #ddd;
}
well i go deep through the datatable.js
the mechanism addClass removeClass toggleClass is using jQuery
hope it helps
you can change the color in your own.
I like to explore new things. There's a way for everything. I believe.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 32 guests