jqGrid: how to do form edit if all fields do not fit to screen
jqGrid edit and add forms render every field in separate row. If there are more fields than fit to screen, edit form height is greater than screen. Bottom edit fields are not visible and cannot edited. Form cannot resized since resizer in lower right corner is outside screen.
How to allow editing of all fields ? Is it possible to render more than one field in row, add horizontal scrollbar to edit form or other idea ?
grid.navGrid("#pager", { }, { url: '<%= Url.Action( "Edit", "Grid") %>',
savekey: [true, 13],
recreateForm: true, // required for textarea datainit
closeOnEscape: true,
closeAfterEdit: true,
errorTextFormat: function (response) { return response.responseText;开发者_如何学C },
}, ...
You can try to use Edit/Add option like
afterShowForm: function($form) {
$form.css({overflow: 'scroll'});
}
to force the usage of the scroll bar in the form or to change the CSS for form.FormGrid
with the same overflow: scroll
value.
You can try to use different values of height
and width
property of the Edit/Add option (see the documentation).
Probably you can solve the problem just by setting of the cols
and rows
attributes:
edittype:'textarea', editoptions: {rows:"10",cols:"80"}
for the corresponding column (see the documentation)
精彩评论