jQuery UI Widgets › Forums › Grid › binding data to grid on button click
Tagged: datagrid export, jqxgrid
This topic contains 7 replies, has 2 voices, and was last updated by parul 13 years, 9 months ago.
-
Author
-
Hello,
I want to know how to bind data to grid on button click not on page load since source:dataadapter initializes the grid on page load
Hi parul,
You can set the source property to point to jqxDataAdapter instance at a later point, after the Grid’s initialization.
Best Wishes,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello,
I want to know when can I use export to excel feature of grid locally on my system. Currently it is accessing your server so I am not able to use this utility in my project.
Hi parul,
When you call the “exportdata” method, do not pass a ‘filename’ and the data will be exported locally. You may take a look at the Grid’s API documentation about the “exportdata” method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello Peter,
I have added the below given code :
$(“#excelExport”).click(function () {
$(“#jqxgrid”).jqxGrid(‘exportdata’, ‘xls’);
});But now nothing is happening when I click on the button.
I have seen the export data method which is having five parameters. The second parameter is the filename which is undefined now.
Hi parul,
The data will be exported locally in the way you did it. However, you don’t have a variable to store the exported data.
var exportedData = $(“#jqxgrid”).jqxGrid(‘exportdata’, ‘xls’);
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello,
On using a variable, data is coming in the variable but how to open it up in a excel file so that it can be saved.
Can anybody suggest me how to export the data of a grid locally without using the server side script. I am able to get the data in a variable but not getting any way to download it in excel sheet.
-
AuthorPosts
You must be logged in to reply to this topic.