Hello jqGrid team,
some time ago, in times of v 3.4.4, I suggested a way to fix the “dirty” solution employed by jqGrid when it creates an during inline cell editing and sets its width to 98%, trying to prevent it from sticking out of the cell. Now I can't find that my post in the forum, and I see my fix did not make 3.5, so I wonder, would you consider it for 3.6? I mean, setting an input width to 98% does not really fix the problem. Depending on the padding/borders set by CSS, the input might still stick out of the cell, as it was in my case…
So, the solution is:
1) wrap input in the
2) the CSS is:
.scroll .twrap { padding:1px 2px; background-color:#FFF; /* optional border here */ }
.scroll .twrap input, .FormGrid .twrap input { border:0 none; padding:0; width:100%; }
so borders (imho not necessary if the selected row background is dark enough but always possible) and padding are moved to the wrapper;
3) the following adjustments in the code are necessary to support the wrapper:
in grid.celledit.js
window.setTimeout(function () { $(elc).focus(); },0);
becomes
window.setTimeout(function () { $(elc).focus(); $('input',elc).focus(); },0);
in grid.common.js
jQuery(elem).css({width:"98%"});
becomes (2 occurences)
elem =
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top