jqgrid not updating data on reload
Posted
by meepmeep
on Stack Overflow
See other posts from Stack Overflow
or by meepmeep
Published on 2010-05-13T11:50:41Z
Indexed on
2010/05/13
11:54 UTC
Read the original article
Hit count: 603
I have a jqgrid with data loading from an xml stream (handled by django 1.1.1):
jQuery(document).ready(function(){
jQuery("#list").jqGrid({
url:'/downtime/list_xml/',
datatype: 'xml',
mtype: 'GET',
postData:{site:1,date_start:document.getElementById('datepicker_start').value,date_end:document.getElementById('datepicker_end').value},
colNames:[...],
colModel :[...],
pager: '#pager',
rowNum: 25,
rowList:[10,25,50],
viewrecords: true,
height: 500,
caption: 'Click on column headers to reorder'
});
$("#grid_reload").click(function(){
$("#list").trigger("reloadGrid");
});
$("#tabs").tabs();
$("#datepicker_start").datepicker({dateFormat: 'yy-mm-dd'});
$("#datepicker_end").datepicker({dateFormat: 'yy-mm-dd'});
...
And the html elements:
<th>Start Date:</th>
<td><input id="datepicker_start" type="text" value="2009-12-01"></input></td>
<th>End Date:</th>
<td><input id="datepicker_end" type="text" value="2009-12-03"></input></td>
<td><input id="grid_reload" type="submit" value="load" /></td>
When I click the grid_reload button, the grid reloads, but when it has done so it shows exactly the same data as before, even though the xml is tested to return different data for different timestamps.
I have checked using alert(document.getElementById('datepicker_start').value) that the values in the date inputs are passed correctly when the reload event is triggered.
Any ideas why the data doesn't update? A caching or browser issue perhaps?
© Stack Overflow or respective owner