ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: omerix on September 17, 2014, 08:28:42 pm

Title: editor checkbox value
Post by: omerix on September 17, 2014, 08:28:42 pm
ColModel
Code: [Select]
,{title: "İzleme",dataIndx: "YETKI1",width:75
,editor: { type: "checkbox", style: "margin:3px 5px;" }
,render: function (ui) {
var rowData = ui.rowData;
return "<img src='../QImg/i16/"+rowData['YETKI1']+".png' class='i16'>";
}
}

checkbox true,false but i want checked value='YES', non-checked=''

Editor checkbox Sample demo?
Title: Re: editor checkbox value
Post by: paramvir on September 18, 2014, 06:09:32 pm
you could use a column.render callback to display "YES" when true and "" when false. it would change your view only.

If you want to save "YES" and "" in your data then remove dataType: "bool" from the column and implement editor.getData callback
Code: [Select]
                        getData: function (ui) {
                            //debugger;
                            var checked = ui.$cell.find("input").is(":checked");
                            if (checked) {
                                return "YES";
                            }
                            else {
                                return "";
                            }
                        }