This is a migrated thread and some comments may be shown as answers.
Post GridCommand from MVC Grid Toolbar?
4 Answers 70 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike
Top achievements
Rank 1
Mike asked on 07 Mar 2011, 10:28 PM
Hi,

I am already using Custom Binding for some custom filtering combined with paging on the MVC Grid. I would like to add an Export to Excel button to the toolbar that will post the current filter/sorting/etc. to the action/route of my choosing so that I can return the current filtered data in an Excel file. How can I do this?

Specifically: How can I set up a toolbar button to post the current GridCommand data to the action/route of my choosing? I know how to do the Excel export part, but I need to know how to post the current filter and sorting data using a toolbar button. Note also that I have too long of a filter to use a Get request, so I must use a Post.

4 Answers, 1 is accepted

Sort by
0
Vinicius
Top achievements
Rank 1
answered on 06 May 2011, 06:31 PM
Hi, I have the same doubt! Did you find a solution?
0
Mike
Top achievements
Rank 1
answered on 06 May 2011, 06:45 PM
There wasn't a telerik built-in solution for this. I ended up just using jQuery to select the button on ready and set a click event on it. The click event then gathers the data it needs and uses the method here: http://www.filamentgroup.com/lab/jquery_plugin_for_requesting_ajax_like_file_downloads/ to do the post to download the file. Hope this helps!
0
Narek
Top achievements
Rank 1
answered on 20 Mar 2012, 10:28 AM
Good question, I have the same problem. I'd like to hear about this issue from Telerik.
0
Dominic
Top achievements
Rank 1
answered on 24 Apr 2012, 12:58 PM
Hello,

i have the same problem.
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Vinicius
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Narek
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Share this question
or