set color foreground for row

Hi,

In my sql table I have a flag (true or false)
Is it possible to show in a different color all the rows with the flag true ?

Thanks

Hello,

You may try to use the setRowColor() method:
docs.dhtmlx.com/api__dhtmlxgrid_setrowcolor.html

I’m trying yhis :

fluxGrid.forEachRow(function(id){
      if( fluxGrid.cells(id, 1).getValue() = '3')
             fluxGrid.setRowColor(id,"red");                    
});

but nothing happend.

Does anybody know how to do ?

You may try to crate a custom column type, which will check your flag a nd change the color due to that flag.
Here you can find an example of cell colorizing on the required conditions:
dhtmlx.com/docs/products/dhtmlxG … ormat.html
and a tutorial about creating a custom column type:
docs.dhtmlx.com/grid__columns_ty … olumntypes

Your code should work correctly.
Please, make sure that you are iterating through the rows when the data is loaded to the grid.
If the problem still occurs for you please, provide with a complete demo, where the problem can be reconstructed locally.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html