Forum
05:38
Steps to reproduce bug:
1. Create a grid with an editurl and editable rows.
var grid = jQuery('#blabla').jqGrid({
...,
editurl: "page.php?parameter=hello"
});
2. Change the editurl parameter.
3. Check it has been changed successfully.
4. Edit one row and save it. You will see that the ajax call goes to "page.php?parameter=hello".
I think it's not an error in my code... can you please fix this? Thanks a lot, be happy
04:49
Moderators
30/10/2007
Hello,
Thanks - where you do (in which event or pice of code) the call.
grid.setGridParam({editurl:”page.php?parameter=bye”});
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
05:05
Hi, Tony,
I use it to filter the grid, when the user changes the value of some filters. Details:
I have a couple of custom inputs with default values as follows:
<input id="desde" value="01/11/2009" onchange="changeFiltroFecha(this);" />
<input id="hasta" value="30/11/2009" onchange="changeFiltroFecha(this);" />
And the default value for editurl is:
Both inputs have a onchange event wich calls to this function, which replaces the corresponding parameter into the url string:
elem = jQuery(elem);
var grid = jQuery('#grid_cuadranteAzafatas');
grid.setGridParam({
url: replaceUrlPart(grid.getGridParam('url'), elem.attr('id'), elem.val()),
editurl: replaceUrlPart(grid.getGridParam('editurl'), elem.attr('id'), elem.val()),
page: 1
}).trigger('reloadGrid'); // <-- When relaoading, ajax calls to the OLD editurl...
alert(grid.getGridParam('editurl')) // <-- ... but this shows the NEW one, so it's not my fault 😛
}
function replaceUrlPart(url, tag, newValue){
return url.replace(RegExp('(\\\\?|&)' + tag + '=[^&]*'), '$1' + tag + '=' + newValue);
}
I hope it's useful to you, and you can fix this.
By the way, excellent job with your plugin, I love it , thanks a lot.
Regards,
Yajo.
09:28
Moderators
30/10/2007
Hello,
Could you please try with the jqGrid3.6RC
Thanks
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
03:10
Hi Tony,
I just tried, and it fails the same way, so I started to look for the error and finally I found it.. it's mine
I'm very sorry to make you lose your time. My problem was in the editRow function. It has one parameter for the editurl, and I was passing there the same value all the time.
By the way, when trying the 3.6RC I got a new error ("val is null") and had to change line 587 of grid.common.js to:
I hope it's useful to you.
Thanks and sorry again,
Yajo.
Most Users Ever Online: 715
Currently Online:
30 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66