Skip to content

Commit b65d200

Browse files
committed
HandleCustomExport passes complete form data
HandleCustomReport renamed to HandleCustomExport
1 parent 83dc345 commit b65d200

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Build/CommonAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
//
1616
// You can specify all the values or you can default the Revision and Build Numbers
1717
// by using the '*' as shown below:
18-
[assembly: AssemblyVersion("1.0.74.0")]
19-
[assembly: AssemblyFileVersion("1.0.74.0")]
18+
[assembly: AssemblyVersion("1.0.75.0")]
19+
[assembly: AssemblyFileVersion("1.0.75.0")]

Griddly.Mvc/GriddlyResult.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ public override void ExecuteResult(ControllerContext context)
152152
var records = GetAll(sortFields);
153153
if (exportFormat == GriddlyExportFormat.Custom)
154154
{
155-
string report = items["reportType"];
156-
result = GriddlySettings.HandleCustomReport(report, records);
155+
result = GriddlySettings.HandleCustomExport(records, items);
157156
}
158157
else if (exportFormat == GriddlyExportFormat.Xlsx)
159158
{

Griddly.Mvc/GriddlySettings.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections;
33
using System.Collections.Generic;
4+
using System.Collections.Specialized;
45
using System.Linq;
56
using System.Linq.Expressions;
67
using System.Web;
@@ -24,7 +25,13 @@ public abstract class GriddlySettings
2425

2526
public static Func<GriddlyButton, object> IconTemplate = null;
2627
public static Func<GriddlyResultPage, object> DefaultFooterTemplate = null;
27-
public static Func<string, IEnumerable, ActionResult> HandleCustomReport = null;
28+
29+
/// <summary>
30+
/// Defines an event handler for custom export requests.
31+
///
32+
/// First argument is the record set. Second argument is the posted form values.
33+
/// </summary>s
34+
public static Func<IEnumerable, NameValueCollection, ActionResult> HandleCustomExport = null;
2835
public static Action<GriddlySettings> BeforeRender = null;
2936
public static Action<GriddlySettings> OnGriddlyResultExecuting = null;
3037

0 commit comments

Comments
 (0)