2012-02-29 144 views

回答

1

您可以使用onSelectRow中的setCell更改單元格的樣式。例如

onSelectRow: function (id) { 
    var $this = $(this); 
    if (id !== lastSel && typeof lastSel !== 'undefined') { 
     $this.jqGrid('setCell', lastSel, 'total', '', {'font-weight': 'normal'}); 
    } 
    $this.jqGrid('setCell', id, 'total', '', {'font-weight': 'bold'}); 
    lastSel = id; 
} 

參見the demo。您可以設置任何其他CSS樣式。

+0

正是我需要的。謝謝! – ffffff01 2012-02-29 20:48:49

+0

@ f01:不客氣! – Oleg 2012-03-01 05:52:38

相關問題