I've written a very basic ajax module to test out the jqGrid navigator. ADD, DELETE and UPDATE work fine but when I try SEARCH the grid does not refresh and when I quit out of the search modal and try an EDIT, DELETE or UPDATE the changes are made to the database but not reflected on the grid. Also the record navigation does not work. I can only get these working again if I press the REFRESH button.
I also have the same problem with the SEARCH function on the downloadable sample files for NAVIGATOR.
The database I'm using is a simple mySQL with a table called MINGRID with fields id, name, number being integer, text, integer.
Here's my HTML file [mingrid.html]:
html, body {
margin: 0;
padding: 0;
font-size: 75%;
}
$(document).ready(function(){
$("#ngrid").jqGrid({
url:'ajaxread.php',
datatype: 'xml',
mtype: 'GET',
colNames:['Id','Name', 'Number'],
colModel :[
{name:'id', index:'id', width:55, search: false},
{name:'name', index:'name', width:90, editable: true},
{name:'number', index:'number', width:80, align:'right', editable: true}
],
pager: '#pager',
height: 300,
width: 600,
rowNum:20,
rowList:[10,20,40,100],
sortname: 'name',
sortorder: 'desc',
viewrecords: true,
caption: 'MinGrid',
editurl: 'ajaxcud.php'
}).navGrid('#pager');
});
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top