style

Hi, I am using grid with smart rendering and CSVString, some rows need to have the same style and stay together, so I need to put the style for those rows and show the next rows with the correct style. How can I solve this??

Thanks!!!

You can change style of the row with setRowTextStyle(row_id, styleString) method docs.dhtmlx.com/doku.php?id=dhtm … wtextstyle

Thanks for replaying.

I am using setRowTextStyle but the problem is …when I use sort or filter
the rows are showed with the setRowTextStyle and the pattern odd, even disapear. How can I get the css pattern and the rows together with the same style??

Thanks!!!

Unfortunately your requirement is not clear.
row style which was set with setRowTextStyle() method has higher priority then style of the even\odd rows.
If you want just change color of even\odd row you can use enableAlterCss() method. Please check more information here dhtmlx.com/docs/products/dht … olors.html

I am sorry I’ll try to be clear this time. I attached some pics about.
I want to show some rows with a similar style like 6 and 7 in pic1. I am using setRowTextStyle. When the sort or filter are used, the grid looks like the second pic. So is it possible to have the grid in the pic1 even with the sort or filter process??

Thanks again!!!

You can use “onFilterEnd” and “onAfterSorting” events to check if filtering and soring was finished and change style of the rows in the necessary way.

grid.attachEvent("onAfterSorting", function(index,type,direction){ grid.setRowTextStyle(... });

docs.dhtmlx.com/doku.php?id=dhtm … tersorting
docs.dhtmlx.com/doku.php?id=dhtm … nfilterend