on 10-23-2014 11:05 AM
Hi everybody,
I'm currently trying to change the background-color of a normal row inside a sap.m.Table.
I've already created a CSS which I added at the index.html.
The CSS contains the following class:
.day_background{
background-color: red;
}
I have acutally a few XML-Views and in one there's a sap.m.Table.
When I try to add the style to the control it seems not to work.
The adding is done by the following code:
oTable.addStyleClass("day_background");
My guess is that the XML-Views have lost the reference for the CSS file?
Looking forward to your answers!
Greetings
Stef
Hi Stefan,
Is there any error in console when you addStyleClass? E.g. is oTable undefined?
One possibility is to change default table/list cell style. You could do that with:
.sapMListTblCell {
background-color: red;
}
Regards,
Kimmo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe there is some other style overriding the background color. Try to add !important after the css style. That should make it show even if there are other styles.
.day_background{
background-color: red !important;
}
If that doesn't work, then the style is somehow not applied or it is not visible because other elements completely hide the background. In that case, could you try to inspect the html with e.g. Chrome to see the styles applied.
Regards,
Kimmo
Message was edited by: Kimmo Jokinen
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.