1
當我選擇一行時,如何在一個特定單元格中將字體粗體設置爲粗體?當選擇行時,將字體設置爲粗體。 Jqgrid
當我選擇一行時,如何在一個特定單元格中將字體粗體設置爲粗體?當選擇行時,將字體設置爲粗體。 Jqgrid
您可以使用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樣式。
正是我需要的。謝謝! – ffffff01 2012-02-29 20:48:49
@ f01:不客氣! – Oleg 2012-03-01 05:52:38