Hello Abu
This is the internal "clone" function of jqgrid
"
function render_js($grid_id,$out)
{
?>
var lastSel;
fx_clone_row = function (grid,id)
{
myData = {};
myData.id = id;
myData.grid_id = grid;
myData.oper = 'clone';
jQuery.ajax({
url: "<?php echo $this->options["url"]?>",
dataType: "json",
data: myData,
type: "POST",
error: function(res, status) {
alert(res.status+" : "+res.statusText+". Status: "+status);
},
success: function( data ) {
}
});
jQuery("#"+grid).jqGrid().trigger('reloadGrid',[{jqgrid_page:1}]);
};
"
The grid, however, is not refreshed.
Firebug shows this error on the "jQuery("#"+grid).jqGrid().trigger('reloadGrid',[{jqgrid_page:1}]); ":
uncaught exception: jqGrid – No such method: undefined
throw("jqGrid – No such method: "+ opts)
Can you fix?
Thanks in advance
Massimo Gagliardi
I am unable to generate this error. Please confirm by running demos/editing/clone-row.php sample if it is giving same error?
If yes, you may need an update.
Hi Abu
I changed lib on phpgrid folder and I tried but didn't work.
Other suggestions?
Thanks in advance
Massimo Gagliardi
Please check firebug console / chrome debug console for JS errors.
If there is some error after clone, email me the screenshot.
It's little difficult to guess the issue when it is not generating here.
I get this error in my console when I try to clone a record.
Uncaught jqGrid – No such method: undefined$.fn.extend.jqGrid @ jqGrid.state.js:380fx_clone_row @ test.php?themeid=18:209jQuery.jqGrid.onClickButton @ test.php?themeid=18:448(anonymous function) @ jquery.jqGrid.min.js:361x.event.dispatch @ jquery.min.js:5v.handle @ jquery.min.js:5
jquery.min.js:6 POST http://10.250.12.103/phpgrid/test.php?themeid=18&grid_id=list1 500 (Internal Server Error)send @ jquery.min.js:6x.extend.ajax @ jquery.min.js:6fx_clone_row @ test.php?themeid=18:198jQuery.jqGrid.onClickButton @ test.php?themeid=18:448(anonymous function) @ jquery.jqGrid.min.js:361x.event.dispatch @ jquery.min.js:5v.handle @ jquery.min.js:5
Any ideas?