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} 

은 체크 박스입니다. 헤더에 체크 박스가 생깁니다.