简体   繁体   中英

How to highlight a gridx row without selecting it in Dojo (Without checking the checkbox)

I am trying in my code to force the grid to have a highlighted row, I know there is no property to do this. (There's only a select one) How can I do a workaround?

If 'rowId' is the index of row to be highlighted, then

grid.row(rowId).node().style.backgroundColor = 'green';

If you already overridden styles for cell, then applying just to row wont have any effect. Then you have to iterate over cells within row and highlight the cells

cellNode.style.backgroundColor = 'green';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM