Command Button Colors inside Datatable
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 3
- Joined: 25 Mar 2018, 04:55
How to change button colors inside datatable? If I set colors in the button still the blue color of the theme (default). Outside datatable button colors works fine.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please try;
Code: Select all
body .ui-datatable tbody.ui-datatable-data .ui-button.ui-state-default {
background: red;
border-bottom: 5px solid blue;
}
body .ui-datatable tbody.ui-datatable-data .ui-button.ui-state-hover {
background: yellow;
}
Github Profile: https://github.com/mertsincan
-
- Posts: 3
- Joined: 25 Mar 2018, 04:55
Hi,
This code works coloring all buttons inside a datatable with the same color (red). I'm trying to use custom colors in different buttons with a tag styleClass="red-button" (for example).
Thanks.
This code works coloring all buttons inside a datatable with the same color (red). I'm trying to use custom colors in different buttons with a tag styleClass="red-button" (for example).
Thanks.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks a lot for the update!
Code: Select all
body .ui-datatable tbody.ui-datatable-data .red-button.ui-button.ui-state-default {
background: red;
border-bottom: 5px solid blue;
}
body .ui-datatable tbody.ui-datatable-data .red-button.ui-button.ui-state-hover {
background: yellow;
}
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
I think you can use $('ELEMENT_SELECTOR').focus() method or add a custom class to element to focus on. Exp; <p:commandButton ... oncomplete="$('ELEMENT_SELECTOR').focus()">
Best Regards,
I think you can use $('ELEMENT_SELECTOR').focus() method or add a custom class to element to focus on. Exp; <p:commandButton ... oncomplete="$('ELEMENT_SELECTOR').focus()">
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest