직접 선택을 해제하려면 내가 어떤 가치있는 답변을 얻을 수 있습니다
var columns = {
person :{
sortable: false,
renderCell: lang.hitch(this, function(object,value,node) {
if(value == true){
myTextBox = new dijit.form.TextBox({
name: "Amount",
value: "" ,
placeHolder: "Enter Amount"
}).placeAt(node);
}
})
},
description:{
label:"description",
field:"description",
sortable: false,
renderCell : lang.hitch(this, function(object,
value, node, options) {
new Select({
name : "select",
options : [ {
label : "Daily",
value : "daily"
}, {
label : "Weekly",
value : "weekly",
}]
}).placeAt(node);
}),
},
email : selector({
sortable:false,
field:"email"
})
/*i tried this instead of using selectors inserting a checkbox so that i can remove complete row selection but not working*/
email: {
sortable:false,
field:"email",
renderHeaderCell : function(node) {
var cellDiv = domConstruct.create("label", {
innerHTML : "Email"
}, node);
var checkBox = new CheckBox({
name: "checkBox",
id:"emailAddress",
checked: false,
}, cellDiv);
},
renderCell:createMessageLabel
}
};
function createMessageLabel(object,value, node,options){
console.log("node option",node);
var checkbox = new CheckBox({
name: "checkBox",
id:"emailAddress",
checked: false,
}).placeAt(node);
};
var grid = new GridView().show(gridData, columns, "",
"dgridAutoHeight", true);
function addSelection(self, event) {
console.log("Row selected: ", event.rows[0].data);
}
function removeSelection(self, event) {
console.log("Row deselected: ", event.rows[0].data);
}
grid.startup();
grid.on("dgrid-select", lang.hitch(grid, addSelection, this), true);
grid.on("dgrid-deselect", lang.hitch(grid, removeSelection, this), true);
희망 ..., 생성자에 전달 된 속성에 selectionMode: "none"
을 설정합니다. 이 값은 selector
열을 통한 선택에는 영향을주지 않습니다.
selector
열 플러그 인에 전달 된 개체의 label
속성을 설정하여 선택기 열의 머리글 셀에 레이블을 설정할 수 있어야합니다.
항목의 필드 값을 변경하기 위해 Dijit 양식 위젯을 사용하려는 경우 renderCell
함수를 직접 정의하지 말고 대신 editor
column plugin을 사용하여 데이터 상태를 유지 관리하고 너가 save
을 부를 때 상점 안에 그것을 두는.
안녕 켄, 덕분에 당신이 가치에 대한 너무 많은 answer..the 편집기 위의 상황에 완벽하게 일했다, 그러나 나는 의심의 여지 응답 아래 확인하시기 바랍니다 rendercell 내부 편집기에 관한 한 당신이 저를 해결하는 데 도움이 수 있기를 바랍니다 ... – Malathesh
+1 좋은 답변과 리소스에 대한 좋은 참조 – devdar