是否有可能在jqGrid(jQuery網格http://www.trirand.com/blog/)具有自定義單元格文字顏色,例如在價格欄中,如果價格> 100 $,則需要紅色,如果價格爲綠色,則需要綠色< 50 $其他灰色?jqGrid與自定義單元格顏色
更一般做
的jqGrid提供了鉤子改變網格cellview,例如當價格欄的單元格被創建或修改時,我可以註冊回調。
或者是否有可能具有單獨的模型和視圖(客戶端) 從服務器我可以發送兩個數據的每一行,即如何顯示和顯示什麼
編輯:所以在這裏是表示取樣格式化器,其顏色的小區是基於值的示例
function infractionInFormatter(el, cellval, opts)
{
$(el).html(cellval).css('color',infraction_color_map[cellval]);
}
colModel :[
...
{name:'date', index:'date', width:120, date:true},
{name:'inf_out', index:'inf_out', width:60, formatter:infractionInFormatter,},
...
],
這不是一個答案的。去[這裏](http://stackoverflow.com/questions/ask)如果你想問一個問題。 – FastTrack 2012-11-20 14:31:30