如何在jqxTreeGrid中添加默认复选框列

时间:2018-09-04 07:27:21

标签: javascript angular jqxgrid jqxtreegrid jqxtree

这是我的专栏-在这种情况下,当我单击第三栏进行编辑时,它会显示复选框,但默认情况下是我想要的复选框。请有人调查一下

columns: any[] = [
    { text: 'Name', dataField: 'AssetClassName', align: 'center', width: '70%' },
    { text: 'Code', dataField: 'AssetClassCode', align: 'right', cellsAlign: 'right', width: '20%' },
    {
      text: 'Inactive', dataField: 'Inactive', filtertype: 'checkedlist', align: 'center', cellsAlign: 'center', width: '10%'
      , columnType: 'template',
      createEditor: (row, cellvalue, editor, cellText, width, height) => {
        // construct the editor.
        editor.jqxCheckBox({ checked: false, hasThreeStates: false});
      },
      initEditor: (row, cellvalue, editor, celltext, width, height) => {
        // set the editor's current value. The callback is called each time the editor is displayed.
        editor.jqxCheckBox('checked', cellvalue);
      },
      getEditorValue: (row, cellvalue, editor) => {
        // return the editor's value.
        return editor.val();
      }
    }
];

0 个答案:

没有答案