Skip to content

Commit 9af660a

Browse files
authored
Merge pull request #80 from jehhynes/master
Pass event to javascript button handler
2 parents fecc860 + b050952 commit 9af660a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Griddly.Mvc/Results/QueryableResult.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ internal void PopulateSummaryValue(GriddlyColumn c)
8585
case SummaryAggregateFunction.Average:
8686
case SummaryAggregateFunction.Min:
8787
case SummaryAggregateFunction.Max:
88-
c.SummaryValue = _result.Aggregate(c.SummaryFunction.Value.ToString(), c.ExpressionString);
89-
88+
try
89+
{
90+
c.SummaryValue = _result.Aggregate(c.SummaryFunction.Value.ToString(), c.ExpressionString);
91+
}
92+
catch (Exception ex) when (ex.InnerException is ArgumentNullException)
93+
{
94+
c.SummaryValue = null;
95+
}
9096
break;
9197

9298
default:

Griddly/Scripts/griddly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@
14741474

14751475
if ($.isFunction(f))
14761476
{
1477-
var result = f.call(button, rowIds);
1477+
var result = f.call(button, rowIds, event);
14781478

14791479
if (clearSelectionOnAction && griddly.length)
14801480
{

0 commit comments

Comments
 (0)