关键点在于绑定数据源后进行判断,可直接获取当前绑定对象的属性
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