Forum
18:57
16/10/2013
Hello to you,
I'm new in JqGrid
How to makes it able export to excel?
var grid = $("#list2");
grid.jqGrid({
url: 'json.php', //URL Tujuan Yg Mengenerate data Json nya
datatype: "json", //Datatype yg di gunakan
height: "auto", //Mengset Tinggi table jadi Auto menyesuaikan dengan isi table
mtype: "GET",
colNames: ['action','id','Nama','Pengarang','Tahun Terbit','Penerbit'],
colModel: [
{name: 'myac', width:60, fixed:true, sortable:false, search:false, align:'center', resizable: false, resize:false, formatter:'actions',
formatoptions:{
keys:true,editbutton: true, delbutton: true, //Key True disini adalah untuk Shorcut Tombol Enter dan Esc, Enter untuk Save, dan Escape Untuk Batal, anda juga Membuatnya jadi False jika anda tidak ingin seperti itu
onSuccess:function(jqXHR) {
alert(jqXHR.responseText);
return true;
}
}
},
{name:'id', key:true, index:'id', hidden:true,editable:false,editrules:{required:true}},
{name:'nama',index:'nama',editable:true,editrules:{required:true}},
{name:'pengarang',index:'pengarang',editable:true,editrules:{required:true}},
{name:'tahun_terbit',index:'tahun_terbit',align:'center',editable:true,editrules:{required:true}},
{name:'penerbit',index:'penerbit',align:'center',editable:true,editrules:{required:true}}
],
rownumbers:true,
rowNum: 10,
rowList: [10,20,30],
pager: '#pager2',
sortname: 'id',
viewrecords: true,
sortorder: "desc",
editurl: "crud.php",
multiselect: false,
caption: "Record Test",
});
grid.jqGrid('navGrid','#pager2',{view:true,edit:true,add:true,del:true});
});
});
Please help, because I have no idea to convert from Example of PHP PDO based into the current based.
Thanks in advance
Regards,
Steven
08:47
Moderators
30/10/2007
Hello,
Export to Excel is done at server and not at client side.
So you will need to look for server side (PHP) solution.
You can look at our commertial version - click demo menu and select php commertial
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:
62 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