Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jqgrid change cell value and stay in edit mode
- editoptions: {
- dataEvents: [
- {
- type: 'blur',
- fn: function(e) {
- var newCodeValue = $(e.target).val();
- // get the information from any source about the
- // description of based on the new code value
- // and construct full new HTML contain of the "description"
- // cell. It should include "<input>", "<select>" or
- // some another input elements. Let us you save the result
- // in the variable descriptionEditHtml then you can use
- // populate descriptionEditHtml in the "description" edit cell
- if ($(e.target).is('.FormElement')) {
- // form editing
- var form = $(e.target).closest('form.FormGrid');
- $("#description.FormElement",form[0]).html(descriptionEditHtml);
- } else {
- // inline editing
- var row = $(e.target).closest('tr.jqgrow');
- var rowId = row.attr('id');
- $("#"+rowId+"_description",row[0]).html(descriptionEditHtml);
- }
- }
- }
- ]
- }
- editrules = new
- {
- custom = true,
- custom_func = function( val, col ) { ... }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement