Forum
23:10
28/12/2010
Hello, Thanks for the great work so far. I'd love to contribute(attempt to help) some day once I get a bit more familiar.
I have a page where I'm stacking closed grids that will be used to update admin domain values.
1) Add value to grid and save successfully.
2) Open another grid, choose add/edit, which uses step 1)'s value in a dataurl results as a dropdown value. If I haven't opened the add/edit modal yet then the ajax call brings back my value in step 1) as a selectable option. However, if I've already opened the add/edit dialog, my recreateForm:true is being called(checked w/ an alert()) but not the .ajax call. IE7 is caching this call I suppose. FireFox and Chrome both are calling the server correctly.
I've tired adding both new Date().getTime() and Math.random() to the end of my urls w/ no success.
In trying to learn, the best way I could manually fix this would be add a small piece of code in grid.common.js createEl() in case:'select' in .ajax like cache: options.cache. Then in the colModel editoptions{dataurl:'/whatever.'/, cache:false} whith the cache:false being the added code.
Obvioulsy I have nearly no idea what I'm talking about but I've been digging around the internet and can't find anything to help other than doing my 'hack' fix in grid.common.js. With the jquery ajax function having a cache option I thought it might make sense?
My grid is below. Hopefully this is just me not know what the heck I'm doing. Any time or thoughts would be great. Thanks again for all the work.
$("#largeList").jqGrid({
url: './level/rest/list',
datatype: 'json',
mytype: 'POST',
colNames:['ID','Country','Currency', 'Benefit', 'Amount'],
colModel:[
{hidden:true, name:'id',index:'id', width:10, editable:false},
{name:'country.id',index:'country.id', width:65, editable:true, edittype:"select", editoptions:{dataUrl:'./dropDown/rest/list?data=Country'}, formoptions: {elmsuffix:' (*)'}},
{name:'currency.id',index:'currency.id', editable:true, width:150, edittype:"select", editoptions:{dataUrl:'./dropDown/rest/list?data=Currency'}, formoptions: {elmsuffix:' (*)'}},
{name:'benefit.id',index:'benefit.id', editable:true, width:150, edittype:"select", editoptions:{dataUrl:'./dropDown/rest/list?data=Benefit', cache: false}, formoptions: {elmsuffix:' (*)'}},
{name:'amount',index:'amount', editable:true, width:150, formoptions: {elmsuffix:' (*)'}}
],
pager: '#largePager',
rowNum: 10,
rowList: [10, 25],
sortname: 'id',
sortorder: 'asc',
viewrecords: true,
width: 600,
height: 235,
caption: 'Large Claim Limits',
hiddengrid: true,
editurl: './level/rest/save'
});
$("#largeList").jqGrid('navGrid', '#largePager',
{edit:true, add:true, del:false, search:false, refresh:true},
{recreateForm:true, jqModal:true, closeOnEscape:true, bottominfo:"Fields marked with (*) are required",
afterSubmit:checkResponse, closeAfterEdit:true},
{recreateForm:true, jqModal:true, closeOnEscape:true, bottominfo:"Fields marked with (*) are required",
afterSubmit:checkResponse, closeAfterAdd: true},
{}, //Delete options
{multipleSearch:false}
);
Most Users Ever Online: 715
Currently Online:
23 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