2

Style applied disappearing in Grid table

 3 months ago
source link: https://community.sap.com/t5/technology-q-a/style-applied-disappearing-in-grid-table/qaq-p/13605176
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Style applied disappearing in Grid table

Hello there

I have applied styling for rows based on condition in onAfterrendering method. It seems that it's getting applied as i could see the change for a second. But it vanishes immediately. Any ideas?

this.getView().byId("id_test").getRows().forEach( function(item){
                    if( item.getCells()[0].getProperty("text") === '1' || item.getCells()[0].getProperty("text") === '2' || item.getCells()[0].getProperty("text") === '3' 
                    || item.getCells()[0].getProperty("text") === '4' || item.getCells()[0].getProperty("text") === '5' || item.getCells()[0].getProperty("text") === '6' ){
                        item.addStyleClass("sectionCell");
                    }
                });

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK