bandariiswear

幽艳纷相竞 秾纤各自奇 虽然春烂漫 也要笔扶持 清人题画诗

导航

使用kendoui对grid指定行变色

关键点在于绑定数据源后进行判断,可直接获取当前绑定对象的属性

  dataBound: function () {
dataView = this.dataSource.view();
for(var i = 0; i < dataView.length; i++) {
    if(dataView[i].FirstName === "Jane") {
                        var uid = dataView[i].uid;
                        $("#grid tbody").find("tr[data-uid=" + uid + "]").addClass("customClass");
                    }
                }

例子在此:http://down.51cto.com/data/941682或者http://download.csdn.net/detail/yekeyishuo/6240123

posted on 2013-09-09 22:52  YEKEYISHUO  阅读(1599)  评论(0编辑  收藏  举报