Reputation: 626
Assume a table with a date header (days 1 till 31) of a given year and month.
The content of the table depends on the selected year and month of course.
Now, for example, assume to set the background-color
of all "weekend" columns to "gray".
With the following code (example from http://scn.sap.com/thread/3360580) we have some problems:
removing of class value seems not working this way, if we change year/month of the bound table data we should change the color accordingly
oTemplate.bindProperty("tooltip", bindPath, function(sValue) {
var classToSet = "";
switch (sValue) {
case "A": classToSet = "cssClassX"; break;
case "B": classToSet = "cssClassY"; break;
default: break;
}
cellId = this.getId();
$("#"+cellId).parent().parent().removeClass("cssClassX", "cssClassY");
$("#"+cellId).parent().parent().addClass(classToSet);
}
More or less the question is:
Is there a way to bound the background-color
of a full table column on some data?
Upvotes: 0
Views: 5643
Reputation: 4920
Wouldn't the sap.me.OverlapCalender
be a better choice instead of using a table? Gives you way more freedom, especially when combined with the sap.me.CalendarLegend
control
See https://sapui5.hana.ondemand.com/sdk/test-resources/sap/me/OverlapCalendar.html for a working example
Upvotes: 1