oups! forgot HTML (notice use of class=scroll, cellpadding=0 and cellspacing=0):
jmdavid said:
I tried ClueTip as well, without success.
My bad, ClueTip is working but it is bigger than jTip (24K vs 4K).
I have exactly the same problem.
I use Zend Framework and Jqgrid without any problem:
url:”/intranet/contact/list?nd=”+new Date().getTime()
works perfectly well for me…
ok, I will try to explain:
1. creation of empty grid
S1Q5Grid = $("#S1Q5").jqGrid({
url:"/wg25/survey/s1q5list/survey_id/0?nd="+new Date().getTime(),
editurl:"/wg25/survey/s1q5edit/survey_id/0?nd="+new Date().getTime(),
/*other stuff not relevant for explanation */
});
2. creation of navbar
$("#S1Q5").navGrid('#S1Q5_pager', {edit:true,add:true,del:true,search:false},
{width:480,height:140,reloadAfterSubmit:true,beforeSubmit:doIt1},
{width:480,height:140,reloadAfterSubmit:true,beforeSubmit:doIt1},
{reloadAfterSubmit:true});
3. I have a select to choose trimester and call corresponding survey via ajax with a callback
function ajxGetSurvey(obj) {
val = obj[obj.selectedIndex].value;
if(parseInt(val, 10) == 0) {
alert("Please choose a trimester.");
}
else {
$.getJSON("/wg25/survey/getsurvey/trimester_id/" + val, ajxGetSurveyResult);
}
}
4. in the callback, I set some other stuff not related to grid, then I want to refresh grid based on returned value (that’s why I need to change editurl to pass survey_id
function ajxGetSurveyResult(data) {
if(data.status == "OK") {
//some other stuff
//NOTE: here survey_id has a value different from 0
S1Q5Grid.setGridParam({url:"/wg25/survey/s1q5list/survey_id/" + survey_id + "?nd=" + new Date().getTime()})
S1Q5Grid.setGridParam({editurl:"/wg25/survey/s1q5list/survey_id/" + survey_id + "?nd=" + new Date().getTime()});
S1Q5Grid.trigger("reloadGrid");
}
}
5. to be sure my edit url is ok, I check it in my beforeSubmit doIt1 function
function doIt1(postData) {
alert(S1Q5Grid.getGridParam('editurl'));
//HERE THE VALUE IS OK
return true;
}
6. I open the form and submit
-the first time, the editurl is ok, it goes to the right place, for example:
http://localhost/wg25/survey/s1q5edit/survey_id/11?nd=1209928582515
-the buttons are OK, labelled ‘Submit’ and ‘Cancel’
7. I change the trimester (Ajax + callback)
8. Grid refresh with right values, url for retrieving data is OK
9. I open a form = PROBLEMS
-the labels are now all to ‘0’
-the doIt1 function alert me that editurl is changed (with survey_id=12 or whatever)
-the submission goes to former editurl (survey_id=11)
I can send all zipped code if you want.
ok, now that I have a setGridParam working, when I try to do this:
S1Q5Grid.setGridParam({editurl:”newurl.php”}).trigger(“reloadGrid”);
I open the form and when I submit, it stay to ‘someurl.php’ (initial option).
I’m stupid. You’re right, I was pointing to wrong old version.
unfortunately, setGridParam gives me an error (other post).
This work:
$(‘#S1Q5’).saveRow(cl, null, “newurl.php”, null, null);
but not:
$(‘#S1Q5’).editRow(cl, true, null, null, “newurl.php”, null, null);
So if I press ‘ENTER’, the new url is not set. It is set only if I click on a save button.
sorry I mad a bad cut’n paste, I do the alert after creation of the grid:
S1Q5Grid = $(“#S1Q5”).jqGrid({
editurl:’someurl’,
…
});
alert($(“#S1Q5”).getGridParam(“editurl”));
I cleared the cache, still error.
oh, last thing, will you move to new official plugin site? now, the only way to find it is in the wiki. The official plugin has only jqgridview and ingrid.
Any timeline, even tentative?
thanks
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top