Welcome Guest, Not a member yet? Register   Sign In
Flexigrid table data to export to excel
#1

[eluser]Pramod[/eluser]
Can anyone help me to export table data of flexigrid to excel??
Thanks in advance.
#2

[eluser]Myles Wakeham[/eluser]
[quote author="Pramod" date="1250781609"]Can anyone help me to export table data of flexigrid to excel??
Thanks in advance.[/quote]

It sounds like you may be getting confused between what should be handled in the presentation layer of MVC vs what should be handled in a Model or data layer. What I mean by this is that your Flexigrid display is just the results of a query. Its what is shown to the end user on their web page. But the actual selection of data that makes up that grid content (and I'm assuming you want ALL pages of data, not just the one showing for the user at the time), is something completely separate to its display.

What we do is to create a query of the data range that is to be displayed in Flexigrid, and store that query (or at least the WHERE clause part of it) as persistent data against a record of the user's current login session. Then when the user moves from page to page, and eventually back to the Flexigrid, we can refresh the grid exactly as they left it in code.

Then taking the same selection that the user originally wanted, its easy to export the data out to whatever format. It has nothing to do with the grid tool - the grid tool is just a view to a paginated window to the data that is selected. I think what you are really asking for is how to keep the selection of data persistent on your app, and how to export that selection of data to a file. Flexigrid should have nothing to do with this.

Myles




Theme © iAndrew 2016 - Forum software by © MyBB