C# .NET - Export the data of a jquery grid to excel.

Asked By shruthi on 25-Jul-13 01:46 AM
I need to export the data of a jquery grid to excel on button click event? How can I achieve ?

Thanks in advance
Shruthi
Sathish S replied to shruthi on 25-Jul-13 02:20 AM
Hi,
Useful demo for your reference
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/dataexport.htm
shruthi replied to Sathish S on 25-Jul-13 02:24 AM
Thanks for the answer. I am using "jqGrid" not "jqxGrid".
Sathish S replied to shruthi on 25-Jul-13 02:42 AM
Oh ok.. 
here it is, have a look into the html tab for the code
http://www.trirand.net/examples/grid/exporting/excel/default.aspx
shruthi replied to Sathish S on 25-Jul-13 02:44 AM
I have already checked this link.. it uses "trirand" license and moreover my project is in C#.net.
Sathish S replied to shruthi on 25-Jul-13 03:14 AM
This one?
http://www.tutorialized.com/tutorial/export-dynamic-data-from-div-to-excel-in-asp.net-using-jquery-and-c/67968
shruthi replied to Sathish S on 25-Jul-13 03:29 AM
Its not working. I m not able to get the html value.

var html = $('#divExport').html();

It shows html is undefined...

shruthi replied to Sathish S on 25-Jul-13 04:43 AM
Thanks it works..but i m not able to open the excel.. it only allows me to save. How can I overcome this?