Dojo data grid row color change when a cell gets edited

邮差的信 提交于 2019-12-25 05:38:07

问题


I need to change the color of my rows in dojo data grid whenever I am editing. I tried dojo.connect, however it works first time after that whenever I hover on other cells its automatically changing the colors of other row.

Does anyone know the solution for this issue?


回答1:


You need to do following

1)CSS changes

.yellowishRow .dojoxGridCell {
    background-color: #F3F781;
}

In your javascript

dojo.connect(dijit.byId("grid"),"onStyleRow",this,function(row){
        var item = dijit.byId("grid").getItem(row.index);
        if (item) {
            var type = store.getValue(item, editMode, null);
                if (type == "1") {
                    row.customClasses += ' regStartedRow';
            }
        dijit.byId("grid").focus.styleRow(row);
        dijit.byId("grid").edit.styleRow(row);

    });     


来源:https://stackoverflow.com/questions/16076701/dojo-data-grid-row-color-change-when-a-cell-gets-edited

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!