You can force reload grid after each edit by setting:
$opt["reloadedit"] = true;
…
$g->set_options($opt);
hi!
it seems to me that the $opt["reloadedit"] = true; does not have any effect.
Every time I edit a record, the hole grid is uploading (is shows the massage 'Loading').
I like to have all the record on the screen and then use a scollbar to find and edit my records. That works fine, but If I edit a row that I found using the scrollbar (that is not on the first page), the grid is refreshed and I loose the focus as now the first page is in the present window.
So if the grid was not refreshed I think it would be better.
Here is my setting:
$grid["rowNum"] = 2000; // big so all records is in one page!
$grid["height"] = "460";
$grid["autowidth"] = false;
$grid["sortname"] = 'anleggNavn';
$grid["sortorder"] = "asc";
$opt["reloadedit"] = false; // DOES NOT WORK?
$g->set_options($grid);
$g->set_actions(array(
"add"=>false, // allow/disallow add
"inlineadd"=>true,
"edit"=>true, // allow/disallow edit
"delete"=>true, // allow/disallow delete
"view"=>true, // allow/disallow delete
"rowactions"=>true, // show/hide row wise edit/del/save option
"export"=>true, // show/hide export to excel option
"autofilter" => true, // show/hide autofilter for search
"search" => false // show single/multi field search condition (e.g. simple or advance)
)
);
Instead of $opt … it should be $grid as per your code.
$grid["sortorder"] = "asc";
$grid["reloadedit"] = true; // <——–
$g->set_options($grid);
yes of course it has to be $grid. Sorry.
But after I changed it, it still reload when I edit a row….
?
Do I need to set some other options too?
If you are using edit dialog, set:
$grid["edit_options"]["reloadAfterSubmit"]=false;
for me doesn’t work on that…
$grid = new jqgrid($db_conf);
$opt[“toolbar”] = “bottom”;
$opt[“caption”] = “Bancos”;
$opt[“height”] = “320”;
$opt[“sortname”] = ‘fecha’; // by default sort grid by this field
$opt[“sortorder”] = “DESC”; // ASC or DESC
$opt[“rowNum”] = 60; // by default 20
$opt[“width”] = “1320”;
$opt[“toolbar”] = “both”;
$opt[“form”][“position”] = “center”; // or “all”
$opt[“resizable”] = true;
$opt[“altRows”] = true;
$opt[“altclass”] = “myAltRowClass”;
$opt[“footerrow”] = true;
$opt[“reloadedit”] = true;
$grid->set_options($opt);
Hi,
Check browser console for possible JS errors. Also check the response of the update ajax call in network tab for possible error.
Send error details and share full grid code.