2011-03-23 21 views

回答

0

嘗試像

for (i = 0; i < columnCount; i++) 
for (k =0; k < rowCount; k++) 
{ 
    var record = grid.getStore().getAt(k); 
    var fieldName = grid.getColumnModel().getDataIndex(i); 
    var val = record.get(fieldName); 
    if (isHiliday(val)) 
    { 
    var cell = grid.getView().getCell(k, i); 
    var el = Ext.get(cell); 
    el.addClass('background-red-style'); 
    } 
} 

,不要忘了包括

.background-red-style 
{ 
    background-color: red; 
} 
+0

這不是ExtJS的電網。這是一個日曆! – MartinJoo 2011-03-24 03:47:41