0

私は列(中央の列)のいずれかにチェックボックスを追加する必要があります..私はいくつかの行を編集不可能なチェックボックスを作ることになっています..私が知る必要がある方法は、助けてください真jqueryを使用してカスタム列のチェックボックスフォーマッター

columnDisplay = [{"name":"columnId", 
        "label":"Column Id", 
        "type":"string" , 
        hidden:true, 
        "width":"200", 
        key:true 
        }, 
        { 
        "name":"columnDisplayName", 
        "label":"Column Display Name", 
        "type":"string" , 
        "visibility":true, 
        "width":"200" 
        }, 

        { 
        "name":"visibility", 
        "label":"Visibility", 
        "editable": true, 
        "width":"200", 
        "edittype": "checkbox", 
        "editoptions": { value:"Y:N" }, 
        "formatter": "checkbox", 
        "formatoptions": { disabled: false} 
     }]; 


createjqGrid : function (gridId , column , gridData){ 
       $("#" + gridId).jqGrid({ 
         datatype: 'local', 
         data: gridData, 
         editurl: 'clientArray', 
         colModel: columns, 
         loadonce: false, 
         autowidth: true, 
         shrinkToFit: false, 
         rownumbers: true, 
         multiselect: multiSelect, 
         multiboxonly:true, 
         cellEdit: false, 
         toppager: true, 
         cloneToTop: true, 
         gridview:true, 
         rowNum: 100, 
         viewrecords : true, 
         pager: "#pager" + gridId, 
         viewsortcols: viewSort, 
         cellsubmit: 'clientArray' 
        }); 
       } 

!!:それは、グリッドにまで来ていないヘッダーが.. ..私はすでに複数選択を設定しています前もって感謝します 。可視性の列には、私が見つかりました..その列のために働くが、ヘッダに私は追加する必要があります...それは、チェックボックスがあるenter image description here

答えて

0

をしなければならない我々は役割タイプを設定する必要が

     "name":"visibility", 
         "label":"<input role='checkbox' type='checkbox' id='grid'>Visibility", 
         "editable": true, 
         "width":"200", 
         "edittype": "checkbox", 
         "editoptions": { value:"Y:N" }, 
         "formatter": "checkbox", 
         "formatoptions": { disabled: false} 

はチェックボックスです。ヘッダーにチェックボックスが表示されます

関連する問題