@@ -10,7 +10,7 @@ public static class GriddlyFilterExtensions
1010 // ********
1111 // NOTE: these methods can be called with null column by the ones on GriddlySettings
1212 // ********
13- public static GriddlyFilterBox FilterBox ( this GriddlyColumn column , FilterDataType dataType = FilterDataType . Decimal , string field = null , string caption = null , string htmlClass = null , string captionPlural = null )
13+ public static GriddlyFilterBox FilterBox ( this GriddlyColumn column , FilterDataType dataType = FilterDataType . Decimal , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , string group = null )
1414 {
1515 if ( caption == null )
1616 caption = column . Caption ;
@@ -28,7 +28,8 @@ public static GriddlyFilterBox FilterBox(this GriddlyColumn column, FilterDataTy
2828 Field = field ,
2929 Caption = caption ,
3030 DataType = dataType ,
31- HtmlClass = htmlClass
31+ HtmlClass = htmlClass ,
32+ Group = group
3233 } ;
3334
3435 if ( captionPlural != null )
@@ -37,7 +38,7 @@ public static GriddlyFilterBox FilterBox(this GriddlyColumn column, FilterDataTy
3738 return filter ;
3839 }
3940
40- public static GriddlyFilterRange FilterRange ( this GriddlyColumn column , FilterDataType dataType = FilterDataType . Decimal , string field = null , string fieldEnd = null , string caption = null , string htmlClass = null , string captionPlural = null )
41+ public static GriddlyFilterRange FilterRange ( this GriddlyColumn column , FilterDataType dataType = FilterDataType . Decimal , string field = null , string fieldEnd = null , string caption = null , string htmlClass = null , string captionPlural = null , string group = null )
4142 {
4243 if ( caption == null )
4344 caption = column . Caption ;
@@ -60,7 +61,8 @@ public static GriddlyFilterRange FilterRange(this GriddlyColumn column, FilterDa
6061 FieldEnd = fieldEnd ,
6162 Caption = caption ,
6263 DataType = dataType ,
63- HtmlClass = htmlClass
64+ HtmlClass = htmlClass ,
65+ Group = group
6466 } ;
6567
6668 if ( captionPlural != null )
@@ -69,7 +71,7 @@ public static GriddlyFilterRange FilterRange(this GriddlyColumn column, FilterDa
6971 return filter ;
7072 }
7173
72- public static GriddlyFilterList FilterList ( this GriddlyColumn column , IEnumerable < SelectListItem > items , bool isMultiple = true , bool defaultSelectAll = false , string nullItemText = null , bool isNoneAll = true , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = false )
74+ public static GriddlyFilterList FilterList ( this GriddlyColumn column , IEnumerable < SelectListItem > items , bool isMultiple = true , bool defaultSelectAll = false , string nullItemText = null , bool isNoneAll = true , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = false , string group = null )
7375 {
7476 if ( caption == null )
7577 caption = column . Caption ;
@@ -105,7 +107,8 @@ public static GriddlyFilterList FilterList(this GriddlyColumn column, IEnumerabl
105107 IsNullable = ! string . IsNullOrWhiteSpace ( nullItemText ) ,
106108 DefaultSelectAll = defaultSelectAll ,
107109 HtmlClass = htmlClass ,
108- DisplayIncludeCaption = displayIncludeCaption
110+ DisplayIncludeCaption = displayIncludeCaption ,
111+ Group = group
109112 } ;
110113
111114 if ( captionPlural != null )
@@ -129,21 +132,21 @@ public static string GetField(GriddlyColumn column)
129132 return value ;
130133 }
131134
132- public static GriddlyFilterList FilterEnum < T > ( this GriddlyColumn column , bool isMultiple = true , bool defaultSelectAll = false , string nullItemText = null , bool isNoneAll = true , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = false )
135+ public static GriddlyFilterList FilterEnum < T > ( this GriddlyColumn column , bool isMultiple = true , bool defaultSelectAll = false , string nullItemText = null , bool isNoneAll = true , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = false , string group = null )
133136 where T : struct
134137 {
135- return column . FilterList ( Extensions . ToSelectListItems < T > ( ) . OrderBy ( x => x . Text ) , isMultiple , defaultSelectAll , nullItemText , isNoneAll , field , caption , htmlClass , captionPlural , displayIncludeCaption ) ;
138+ return column . FilterList ( Extensions . ToSelectListItems < T > ( ) . OrderBy ( x => x . Text ) , isMultiple , defaultSelectAll , nullItemText , isNoneAll , field , caption , htmlClass , captionPlural , displayIncludeCaption , group ) ;
136139 }
137140
138- public static GriddlyFilterList FilterEnum < T > ( this GriddlyColumn column , IEnumerable < T > items , bool isMultiple = true , bool defaultSelectAll = false , string nullItemText = null , bool isNoneAll = true , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = false )
141+ public static GriddlyFilterList FilterEnum < T > ( this GriddlyColumn column , IEnumerable < T > items , bool isMultiple = true , bool defaultSelectAll = false , string nullItemText = null , bool isNoneAll = true , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = false , string group = null )
139142 where T : struct
140143 {
141- return column . FilterList ( Extensions . ToSelectListItems ( items ) . OrderBy ( x => x . Text ) , isMultiple , defaultSelectAll , nullItemText , isNoneAll , field , caption , htmlClass , captionPlural , displayIncludeCaption ) ;
144+ return column . FilterList ( Extensions . ToSelectListItems ( items ) . OrderBy ( x => x . Text ) , isMultiple , defaultSelectAll , nullItemText , isNoneAll , field , caption , htmlClass , captionPlural , displayIncludeCaption , group ) ;
142145 }
143146
144- public static GriddlyFilterList FilterBool ( this GriddlyColumn column , string trueLabel = "Yes" , string falseLabel = "No" , string nullItemText = null , bool isMultiple = false , bool defaultSelectAll = false , bool isNoneAll = false , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = true )
147+ public static GriddlyFilterList FilterBool ( this GriddlyColumn column , string trueLabel = "Yes" , string falseLabel = "No" , string nullItemText = null , bool isMultiple = false , bool defaultSelectAll = false , bool isNoneAll = false , string field = null , string caption = null , string htmlClass = null , string captionPlural = null , bool displayIncludeCaption = true , string group = null )
145148 {
146- return column . FilterList ( BuildBoolItems ( trueLabel , falseLabel ) , isMultiple , defaultSelectAll , nullItemText , isNoneAll , field , caption , htmlClass , captionPlural , displayIncludeCaption ) ;
149+ return column . FilterList ( BuildBoolItems ( trueLabel , falseLabel ) , isMultiple , defaultSelectAll , nullItemText , isNoneAll , field , caption , htmlClass , captionPlural , displayIncludeCaption , group ) ;
147150 }
148151
149152 static List < SelectListItem > BuildBoolItems ( string trueLabel , string falseLabel )
0 commit comments