How do I set row color as data when initialize grid from jso


I try to set row color or text color differently as json data.



for example



I made this Json object that contains



value="{ id :’${inquiry.id}’,

     userdata:{categoryId:’${inquiry.categoryId }’,

ansIdForAnswer : ‘${inquiry.ansIdForAnswer}’                

},

data:[’${checkvalue}’,’${inquiry.id}’,’${inquiry.title}’,’${inquiry.categoryName}’,’${inquiry.custId}’,

     ‘${inquiry.custEmail}’,’${inquiry.unacptRegistDate}’,’${inquiry.registDate}’,’${inquiry.memberGradeName}’ ]}"/>



I’d like to set text color red if inquiry.registDate is passed 24 hours from currentTime ,

set it blue if it is passed 12 hours from currentTime etc.



I found setRowTextStyle(row_id , style String) from your API Function Document.



but it can be used after initializing grid and loading the json data by checking whole data through another loop. isn’t it?



is there a API or solution set the color while I load data?







The best way to do that is to implement custom eXcell type. Please check this article dhtmlx.com/docs/products/kb/ … r%20change

Also, you can try to use onRowCreated event

grid.attachEvent(“onRowCreated”,function(id){
var vall = this.cells(id,6);
if (some_check(vall))
this.setRowTextStyle(id ,“some styles here”);
})