Forum







02:43

06/08/2008

Hi,
Need a little help. I've succesfuly loaded basic grid using xml from
a database. The problem is when I try to add navigation buttons, these
buttons does not show i.e. (refresh, edit) The select function works fine if i do not add this code =>
<--- Code starts here---->
jQuery("#filetable").navGrid("#filepager",{edit:false,add:faldse,del:false});
<---Code Ends Here----->
Below is my code:
<---Code starts here--->
$(document).ready(function(){
jQuery("#filetable").jqGrid({
url:'process/proc.list.file.php',
datatype: "xml",
//mtype: 'GET',
colNames:['File ID', 'Project', 'Style', 'File Name', 'Length', 'Size', 'Arrival', 'TAT'],
colModel:[
{name:'fld_fileid', index:'fld_fileid', width:55},
{name:'fld_project_name', index:'fld_project_name', width:120},
{name:'fld_style', index:'fld_style', width:70},
{name:'fld_oldname', index:'fld_oldname', width:400},
{name:'fld_file_length', index:'fld_file_length', width:70},
{name:'fld_filesize', index:'fld_filesize', width:70},
{name:'fld_arrival_time', index:'fld_arrival_time', width:120},
{name:'fld_tat', index:'fld_tat', width:120}
],
rowNum:10,
rowList:[10,20,30],
imgpath: 'plugins.jqGrid/themes/green/images',
pager: jQuery('#filepager'),
sortname: 'id',
viewrecords: true,
sortorder: "desc",
multiselect: true,
caption: "Multi Select Example"
});
jQuery("#filetable").navGrid("#filepager",{edit:false,add:faldse,del:false});
jQuery("#a1").click( function(){
var id = jQuery("#filetable").getGridParam('selrow');
if (id) {
var ret = jQuery("#filetable").getRowData(id);
alert("fld_fileid="+ret.fld_project_name+"fld_project_name="+ret.fld_project_name+"...");
} else { alert("Please select row");}
});
});
<---Code Ends Here----->
Am I doing something wrong here?
03:21

Moderators
30/10/2007

Also check if you have loaded all the needed modules and Styles - refer to documentation. Check if the paths are correct. This is common problem when trying to use navigator
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.
Most Users Ever Online: 715
Currently Online:
48 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