1
Bug Report / Re: pqGrid v11 Cannot Input Text When Moving Focus to Editable Cell with Null Value
« on: April 27, 2026, 06:33:23 am »
I have verified that the code you provided is working correctly. Thank you.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
var blob = await grid.exportData({
// url: "exportData.do",
format: format,
nopqdata: true, // applicable for JSON export
render: false,
sheetName: "Example",
replace: [/<br\/>/g, '\r\n']
});
if (typeof blob === "string") {
blob = new Blob([blob]);
}
saveAs(blob, excelNm + "." + format);
var colM = [{
title: "Auto size editor (Enter for new lines)",
width: 200,
dataIndx: "ShipAddress1",
editable: false,
editModel: {
saveKey: ''
}
},
{
title: "Auto size editor (Alt-Enter for new lines)",
width: 200,
dataIndx: "ShipAddress2"
},
{
title: "Manually resizable editor",
width: 200,
dataIndx: "ShipAddress3",
editor: {
type: "textarea",
attr: "rows=8 cols=58",
style: "resize:both;",
appendTo: 'grid'
},
editModel: {
saveKey: ''
}
}
];
var dataModel = {
location: "remote",
dataType: "JSON",
method: "GET",
url: "/content/invoice.json",
getData: function(response) {
response.data.forEach(function(rd) {
rd.ShipAddress1 = rd.ShipAddress2 = rd.ShipAddress3 =
rd.ShipAddress + "\n" +
rd.ShipCity + "\n" +
(rd.ShipRegion || "") + "\n" +
rd.ShipPostalCode;
});
return response;
}
};
$("div#grid_custom_editing").pqGrid({
title: "Shipping Orders",
dataModel: dataModel,
colModel: colM,
autoRow: true,
scrollModel: {
autoFit: true
},
columnTemplate: {
valign: 'center'
},
create: function(evt, ui) {
this.widget().pqTooltip();
},
editModel: {
clicksToEdit: 1,
keyUpDown: false
},
numberCell: {
show: false
},
resizable: true
});
!function(e){var gExcel = null;e(document).off(".pqExcel").on("keydown.pqExcel",function(c){var t,n,i=e(document.activeElement),l=i.parent(),o=l.is(".pq-focus-mgr:not(.pq-editor-outer)"),r=o,p=c.key,E=c.keyCode,u=e.ui.keyCode,g=e=>{t=i.closest(".pq-grid"),n=t.pqGrid("instance")};if(!o||E!=u.UP&&E!=u.DOWN||c.preventDefault(),o&&E==u.DELETE&&(g(),n?.clear()),pq.isCtrl(c)&&r&&(g(),gExcel||i.length&&n)){if(!gExcel)try{if(n.options.selectionModel.native)return!0;gExcel=new cExcel(n)}catch(e){return!0}i=gExcel.initClip(i,l),"f"!=p&&"F"!=p||e(document).trigger("keyup.pqExcel")}}).on("keyup.pqExcel",function(e){if(!pq.isCtrl(e)&&gExcel){gExcel=null}}).on("click.pqExcel keydown.pqExcel",function(c){"click"!=c.type&&e.ui.keyCode.ENTER!=c.keyCode||e(c.target).trigger("pq:clickE")})}(jQuery);
-- Initial settings
dataModel: {data: []}
-- When clicking the search button
$("#btnSearch").click(function() {
var postData = $(form + " :input").serializeObject();
var dataModel = {
location: "remote",
dataType: "JSON",
method: "POST",
url: $(form).attr("action"),
postData: postData
};
$("#gridDiv").pqGrid("option", "dataModel", dataModel);
$("#gridDiv").pqGrid("refreshDataAndView");
});