2022年8月15日 星期一

Question : V120402 - CheckBox & 全選CheckBox 如何處理 - Grid - 不用 CheckboxModel

目的: 如何加入 CheckBox 及全選 CheckBox

處理說明:  1>Grid.Columns 加入 CheckBox 欄 (xtype; 'checkcolumn')
                   2>如何標示每一row id , checkbox
                   ?? 3>如何全選 CheckBox 


1>*.js

var J_columns = [
{ header: "", xtype: "rownumberer", width: 50, align: "center", sortable: false },
{
header: '勾選',
dataIndex: 'CHECK',
xtype: 'checkcolumn',
width: 60,
renderer: function (value, metadata, record, rowIndex, colIndex, store) {
var tempVal = '';
if ((value === 'Y') || (value === true)) { tempVal = 'checked'; }
var Tmp_Str = "<input  type='checkbox'  name=" + (record.get('AMMNO')) + "   " + tempVal + " >";
return Tmp_Str;
},




沒有留言:

張貼留言