Features
- Overview
- Collapsible Column Headers
- Styling Records, Groups, and Cells
- Grouping
- Group Headers
- Row Header
- Filtering
- Row and Column Freezing
- Paging
- Group Panel
- Remote Data Binding
- Custom Cells
- Custom Editors
- Custom Column Headers
- Editing
- Batch Editing
- Sorting
- Virtual Scrolling
- Disable Server Reading
- Data Map
- Excel Export
- PDF Export
- Unobtrusive Validation
Filtering
Filtering
This view shows how to use filtering in MultiRow.
Features
Ordered
Shipped
City
State
Zip
Express
0
Tom Brown
Tom.Brown@gmail.com
Flash Delivery
$387.00
3167 Brown St.
296-2310
flash@gmail.com
6/4/2025
6/8/2025
Paris
SC
42944-111
1
Bill Bannon
Bill.Bannon@gmail.com
Speedy Express
$1,068.00
7536 Johnson St.
425-2767
express.speedy@gmail.com
12/1/2022
12/3/2022
York
RT
26322-908
2
Mark Wong
Mark.Wong@gmail.com
Speedy Express
$3,903.00
4514 Johnson St.
878-5915
express.speedy@gmail.com
12/31/2019
1/1/2020
Rome
SC
72446-688
3
Bill Wong
Bill.Wong@gmail.com
Speedy Express
$1,538.00
4151 Brown St.
939-5203
express.speedy@gmail.com
7/2/2023
7/6/2023
Florence
SP
13754-133
4
Tony Johnson
Tony.Johnson@gmail.com
Speedy Express
$2,189.00
2642 Wong St.
595-9214
express.speedy@gmail.com
6/25/2024
6/29/2024
Hamburg
RS
12822-928
5
Tony Adams
Tony.Adams@gmail.com
Flash Delivery
$2,132.00
3343 Bannon St.
229-7494
flash@gmail.com
2/26/2023
2/27/2023
York
RT
94568-493
6
Sue Brown
Sue.Brown@gmail.com
Speedy Express
$978.00
7559 White St.
191-7999
express.speedy@gmail.com
3/27/2023
3/30/2023
Florence
SP
26891-420
7
Bill Wong
Bill.Wong@gmail.com
Flash Delivery
$2,703.00
6722 Brown St.
717-1331
flash@gmail.com
1/6/2023
1/10/2023
Rome
RS
23561-837
8
Mark Richards
Mark.Richards@gmail.com
Logitrax
$3,497.00
7607 Wong St.
118-2157
logitrax@gmail.com
10/12/2018
10/14/2018
York
RS
71306-859
9
John Peters
John.Peters@gmail.com
Speedy Express
$2,343.00
5549 Peters St.
646-6070
express.speedy@gmail.com
8/6/2023
8/8/2023
York
SC
76277-136
10
Brad Johnson
Brad.Johnson@gmail.com
Logitrax
$4,150.00
8735 Brown St.
734-9992
logitrax@gmail.com
4/30/2024
5/1/2024
Rome
RS
14766-619
11
Mark Wong
Mark.Wong@gmail.com
Speedy Express
$3,781.00
4514 Johnson St.
878-5915
express.speedy@gmail.com
5/24/2023
5/27/2023
Rome
SC
72446-688
12
Joe Richards
Joe.Richards@gmail.com
Logitrax
$1,675.00
8494 Brown St.
990-8610
logitrax@gmail.com
4/21/2023
4/25/2023
York
RS
24156-435
13
Tony White
Tony.White@gmail.com
Logitrax
$645.00
4202 Johnson St.
457-8054
logitrax@gmail.com
5/13/2025
5/17/2025
Paris
RN
54696-872
14
Paul Wong
Paul.Wong@gmail.com
Flash Delivery
$3,135.00
7282 Wong St.
401-9290
flash@gmail.com
2/24/2023
2/26/2023
York
RN
99139-413
15
Paul Wong
Paul.Wong@gmail.com
Speedy Express
$2,039.00
9232 Brown St.
467-5947
express.speedy@gmail.com
10/4/2018
10/5/2018
York
RN
16688-635
16
Paul White
Paul.White@gmail.com
Speedy Express
$4,226.00
3823 White St.
395-6432
express.speedy@gmail.com
7/30/2018
8/2/2018
Hamburg
RN
15523-631
17
Brad Johnson
Brad.Johnson@gmail.com
Speedy Express
$2,202.00
8735 Brown St.
734-9992
express.speedy@gmail.com
10/16/2024
10/20/2024
Rome
RS
14766-619
18
Paul Brown
Paul.Brown@gmail.com
Flash Delivery
$2,997.00
8630 Smith St.
970-1891
flash@gmail.com
1/28/2019
1/29/2019
York
CS
68294-342
19
Bill Wong
Bill.Wong@gmail.com
Logitrax
$4,244.00
9939 Adams St.
631-1896
logitrax@gmail.com
3/7/2018
3/11/2018
Cairo
SP
20475-280
20
Paul White
Paul.White@gmail.com
Logitrax
$4,119.00
3823 White St.
395-6432
logitrax@gmail.com
9/1/2022
9/3/2022
Hamburg
RN
15523-631
21
Paul Wong
Paul.Wong@gmail.com
Speedy Express
$1,156.00
9232 Brown St.
467-5947
express.speedy@gmail.com
5/28/2018
5/31/2018
York
RN
16688-635
22
Mark Wong
Mark.Wong@gmail.com
Flash Delivery
$1,691.00
4514 Johnson St.
878-5915
flash@gmail.com
11/18/2023
11/19/2023
Rome
SC
72446-688
23
Paul Wong
Paul.Wong@gmail.com
Logitrax
$3,133.00
7282 Wong St.
401-9290
logitrax@gmail.com
12/10/2019
12/11/2019
York
RN
99139-413
24
John Peters
John.Peters@gmail.com
Speedy Express
$1,887.00
5549 Peters St.
646-6070
express.speedy@gmail.com
12/14/2023
12/16/2023
York
SC
76277-136
ID
Customer
Customer Email
Shipper
Amount
Address
Customer Phone
Shipper Email
Ordered
Shipped
City
State
Zip
Express
0
loading...
Settings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | using C1.Web.Mvc; using MultiRowExplorer.Models; using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; using C1.Web.Mvc.Serialization; using Microsoft.AspNetCore.Http; namespace MultiRowExplorer.Controllers { public partial class MultiRowController : Controller { private static OptionItem CreateOptionItem() { return new OptionItem { Values = new List< string > { "None" , "Condition" , "Value" , "Both" }, CurrentValue = "Both" }; } private readonly ControlOptions _filterOptions = new ControlOptions { Options = new OptionDictionary { { "CustomerState" , CreateOptionItem()}, { "CustomerCity" , CreateOptionItem()}, { "ShipperName" , CreateOptionItem()}, { "ShipperExpress" , CreateOptionItem()}, { "Amount" , CreateOptionItem()} } }; public ActionResult Filter(IFormCollection data) { _filterOptions.LoadPostData(data); ViewBag.DemoOptions = _filterOptions; ViewBag.FilterTypes = GetFilterTypes(_filterOptions); return View(); } public ActionResult Filter_Bind([C1JsonRequest] CollectionViewRequest<Orders.Order> requestData) { return this .C1Json(CollectionViewHelper.Read(requestData, Orders.GetOrders())); } private Dictionary< string , FilterType> GetFilterTypes(ControlOptions controlOptions) { var filterTypes = new Dictionary< string , FilterType>(); foreach (var item in controlOptions.Options) { filterTypes.Add(item.Key, (FilterType)Enum.Parse( typeof (FilterType), item.Value.CurrentValue)); } return filterTypes; } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | @model IEnumerable< Orders.Order > @ { var cities = Orders.GetCities().ToValues(); ControlOptions optionsModel = ViewBag.DemoOptions; Dictionary< string , FilterType> filterTypes = ViewBag.FilterTypes; ViewBag.DemoSettings = true ; ViewBag.DemoDescription = false ; } < c1-multi-row id = "filteringMultiRow" is-read-only = "true" selection-mode = "Row" sorting-type = "SingleColumn" class = "multirow" > < c1-items-source read-action-url = "@Url.Action(" Filter_Bind ")" page-size = "25" ></ c1-items-source > < c1-multi-row-cell-group header = "Order" colspan = "2" > < c1-multi-row-cell binding = "Id" header = "ID" class = "id" colspan = "2" /> < c1-multi-row-cell binding = "Amount" header = "Amount" format = "c" class = "amount" colspan = "2" /> < c1-multi-row-cell binding = "Date" header = "Ordered" /> < c1-multi-row-cell binding = "ShippedDate" header = "Shipped" /> </ c1-multi-row-cell-group > < c1-multi-row-cell-group header = "Customer" colspan = "3" > < c1-multi-row-cell binding = "Customer.Name" name = "CustomerName" header = "Customer" /> < c1-multi-row-cell binding = "Customer.Email" name = "CustomerEmail" header = "Customer Email" class = "email" colspan = "2" /> < c1-multi-row-cell binding = "Customer.Address" name = "CustomerAddress" header = "Address" colspan = "2" /> < c1-multi-row-cell binding = "Customer.Phone" name = "CustomerPhone" header = "Customer Phone" /> < c1-multi-row-cell binding = "Customer.City" name = "CustomerCity" header = "City" datamap-editor = "@C1.Web.Mvc.Grid.DataMapEditor.DropDownList" > < c1-data-map display-member-path = "Value" selected-value-path = "Value" > < c1-items-source source-collection = "cities" /> </ c1-data-map > </ c1-multi-row-cell > < c1-multi-row-cell binding = "Customer.State" name = "CustomerState" header = "State" /> < c1-multi-row-cell binding = "Customer.Zip" name = "CustomerZip" header = "Zip" /> </ c1-multi-row-cell-group > < c1-multi-row-cell-group header = "Shipper" > < c1-multi-row-cell binding = "Shipper.Name" name = "ShipperName" header = "Shipper" width = "*" /> < c1-multi-row-cell binding = "Shipper.Email" name = "ShipperEmail" header = "Shipper Email" class = "email" /> < c1-multi-row-cell binding = "Shipper.Express" name = "ShipperExpress" header = "Express" /> </ c1-multi-row-cell-group > < c1-flex-grid-filter default-filter-type = "Both" > < c1-flex-grid-column-filter column = "CustomerState" filter-type = "@filterTypes[" CustomerState "]" ></ c1-flex-grid-column-filter > < c1-flex-grid-column-filter column = "CustomerCity" filter-type = "@filterTypes[" CustomerCity "]" ></ c1-flex-grid-column-filter > < c1-flex-grid-column-filter column = "ShipperName" filter-type = "@filterTypes[" ShipperName "]" ></ c1-flex-grid-column-filter > < c1-flex-grid-column-filter column = "ShipperExpress" filter-type = "@filterTypes[" ShipperExpress "]" ></ c1-flex-grid-column-filter > < c1-flex-grid-column-filter column = "Amount" filter-type = "@filterTypes[" Amount "]" ></ c1-flex-grid-column-filter > </ c1-flex-grid-filter > </ c1-multi-row > < c1-pager owner = "filteringMultiRow" ></ c1-pager > @section Settings{ @Html .Partial( "_OptionsMenu" , optionsModel) } @section Summary{ @Html .Raw(MultiRowRes.Filter_Text0) } |