@@ -394,7 +394,7 @@ public GriddlySettings<TRow> RowId(Expression<Func<TRow, object>> expression, st
394
394
return this ;
395
395
}
396
396
397
- public GriddlySettings < TRow > Column < TProperty > ( Expression < Func < TRow , TProperty > > expression , string caption = null , string format = null , string expressionString = null , SortDirection ? defaultSort = null , string className = null , bool isExportOnly = false , string width = null , SummaryAggregateFunction ? summaryFunction = null , object summaryValue = null , Func < TRow , object > template = null , Func < GriddlyColumn , GriddlyFilter > filter = null , Func < TRow , object > htmlAttributes = null , object headerHtmlAttributes = null , int defaultSortOrder = 0 )
397
+ public GriddlySettings < TRow > Column < TProperty > ( Expression < Func < TRow , TProperty > > expression , string caption = null , string format = null , string expressionString = null , SortDirection ? defaultSort = null , string className = null , bool isExportOnly = false , string width = null , SummaryAggregateFunction ? summaryFunction = null , object summaryValue = null , Func < TRow , object > template = null , Func < GriddlyColumn , GriddlyFilter > filter = null , Func < TRow , object > htmlAttributes = null , object headerHtmlAttributes = null , int defaultSortOrder = 0 , Expression < Func < TRow , object > > value = null )
398
398
{
399
399
ModelMetadata metadata = null ;
400
400
@@ -446,6 +446,7 @@ public GriddlySettings<TRow> Column<TProperty>(Expression<Func<TRow, TProperty>>
446
446
if ( headerHtmlAttributes != null && ! ( headerHtmlAttributes is IDictionary < string , object > ) )
447
447
headerHtmlAttributes = HtmlHelper . AnonymousObjectToHtmlAttributes ( headerHtmlAttributes ) ;
448
448
449
+ var valueTemplate = value == null ? null : value . Compile ( ) ;
449
450
Add ( new GriddlyColumn < TRow > ( )
450
451
{
451
452
Template = template ,
@@ -460,15 +461,16 @@ public GriddlySettings<TRow> Column<TProperty>(Expression<Func<TRow, TProperty>>
460
461
IsExportOnly = isExportOnly ,
461
462
Width = width ,
462
463
HtmlAttributesTemplate = htmlAttributes ,
463
- HeaderHtmlAttributes = ( IDictionary < string , object > ) headerHtmlAttributes
464
+ HeaderHtmlAttributes = ( IDictionary < string , object > ) headerHtmlAttributes ,
465
+ UnderlyingValueTemplate = valueTemplate
464
466
} , filter ) ;
465
467
466
468
return this ;
467
469
}
468
470
469
- public GriddlySettings < TRow > Column ( string caption = null , string format = null , string expressionString = null , SortDirection ? defaultSort = null , string className = null , bool isExportOnly = false , string width = null , SummaryAggregateFunction ? summaryFunction = null , object summaryValue = null , Func < TRow , object > template = null , Func < GriddlyColumn , GriddlyFilter > filter = null , Func < TRow , object > htmlAttributes = null , object headerHtmlAttributes = null , int defaultSortOrder = 0 )
471
+ public GriddlySettings < TRow > Column ( string caption = null , string format = null , string expressionString = null , SortDirection ? defaultSort = null , string className = null , bool isExportOnly = false , string width = null , SummaryAggregateFunction ? summaryFunction = null , object summaryValue = null , Func < TRow , object > template = null , Func < GriddlyColumn , GriddlyFilter > filter = null , Func < TRow , object > htmlAttributes = null , object headerHtmlAttributes = null , int defaultSortOrder = 0 , Expression < Func < TRow , object > > value = null )
470
472
{
471
- return Column < object > ( null , caption , format , expressionString , defaultSort , className , isExportOnly , width , summaryFunction , summaryValue , template , filter , htmlAttributes , headerHtmlAttributes , defaultSortOrder ) ;
473
+ return Column < object > ( null , caption , format , expressionString , defaultSort , className , isExportOnly , width , summaryFunction , summaryValue , template , filter , htmlAttributes , headerHtmlAttributes , defaultSortOrder , value ) ;
472
474
}
473
475
474
476
public GriddlySettings < TRow > SelectColumn ( Expression < Func < TRow , object > > id , object summaryValue = null )
0 commit comments