81,095
社区成员
发帖
与我相关
我的任务
分享
grid.on('cellclick',function(a,b,c,d,e){
var rowIndex = $("#cellrowIndex").val();
var colIndex = $("#cellcolIndex").val();
var oldColor = $("#oldColor").val();
if(rowIndex != b || colIndex != c)
{
if(rowIndex == "" || colIndex == "" )
{
rowIndex = 0;
colIndex = 0;
}
grid.getView().getCell(rowIndex,colIndex).style.backgroundColor=oldColor;
var oldColor = grid.getView().getCell(b,c).style.backgroundColor;
grid.getView().getCell(b,c).style.backgroundColor="#B0CFDB";
$("#cellrowIndex").val(b);
$("#cellcolIndex").val(c);
$("#oldColor").val(oldColor);
}