Reload after clone doesn't work

QuestionsReload after clone doesn't work
Massimo Gagliardi asked 9 years ago

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

7 Answers
Abu Ghufran answered 9 years ago

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.

Massimo Gagliardi answered 9 years ago

Yes, Abu
Running demos/editing/clone-row.php I have the same error.
Thanks

Abu Ghufran answered 9 years ago

Emailed you an update.

Massimo Gagliardi answered 9 years ago

Hi Abu
I changed lib on phpgrid folder and I tried but didn't work.
Other suggestions?
Thanks in advance
Massimo Gagliardi

Abu Ghufran answered 9 years ago

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.

Massimo Gagliardi answered 9 years ago

Hei Abu
All ok, after installing the new lib.
Excuse me for delay.
Regards

Randy Blair answered 9 years ago

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?

Your Answer

14 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?