on 12-19-2014 5:47 PM
Hi,
I have just recently started working on SAP UI5.
I am trying to build a simple application that pulls out data from a JSON file and displays the same in 3 tables and a list (across 2 pages). One of the features required by my application is to group the contents of columns together when they are duplicate and since the sap.m.table provides this feature (using mergeDuplicates) I have used the same for building my tables.
However, I also have a couple of other requirements that I am finding very difficult to implement using this table. They are listed below:
1. For one table I want to change the background colour for some of the column headers. I do not want the background colour of the column data changed. Also to further complicate this, I would like to set different colours for different column headers. Would you be able to give me some hints on how to go about this?
2. For another table I want to change the background colour of the cells of one column based on the value of the cell. In this case, using factory functions I am able to conditionally change the colour of either the entire row, or only a small area around the cell text, but not the entire cell. Is it actually possible to colour the entire cell? If yes, how?
Any help with these two issues would be much appreciated.
Thanks,
Mary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You might have added column using sap.m.Column. In that you can add style sheet. There is property as well method too.
-Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siddharth,
Thank you for your response.
I did try to add the style sheet to the sap.m.Column, however when I do so, both the header and data cells get coloured with the same colour. So I am not able to only colour the header cells of the columns.
Also, if I try to add the style sheet to the column, I am not able to conditionally colour the data cells for that header.
Am I missing something here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.