Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
How to Export to Excel?
24/10/2013
18:57
Avatar
stvhui
New Member
Members
Forum Posts: 2
Member Since:
16/10/2013
sp_UserOfflineSmall Offline

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

29/10/2013
08:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

03/12/2014
17:37
Avatar
upperdeck
Member
Members
Forum Posts: 8
Member Since:
05/11/2014
sp_UserOfflineSmall Offline

i looked thru that php example.  where in this code does it call something to render the export file? if you are using the navgrid api i dont see where you can add the excel = true?  but even if you do what happens after you click the button? what is being called to create the file?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 215

Currently Online:
44 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.com, swathi

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information