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
Mark Adams
Mark.Adams@gmail.com
Flash Delivery
$3,782.00
7318 Wong St.
725-6330
flash@gmail.com
6/14/2022
6/15/2022
Paris
RN
76500-770
1
Joe White
Joe.White@gmail.com
Logitrax
$977.00
137 Smith St.
122-7823
logitrax@gmail.com
2/3/2020
2/4/2020
Florence
SP
26631-481
2
Mark Richards
Mark.Richards@gmail.com
Speedy Express
$2,221.00
4482 Peters St.
703-9444
express.speedy@gmail.com
8/9/2020
8/13/2020
Hamburg
RS
55156-520
3
Mark Wong
Mark.Wong@gmail.com
Logitrax
$298.00
1747 Smith St.
939-5268
logitrax@gmail.com
12/3/2017
12/4/2017
Florence
SC
18150-851
4
Mark Johnson
Mark.Johnson@gmail.com
Speedy Express
$1,747.00
4356 Adams St.
312-8240
express.speedy@gmail.com
3/8/2022
3/12/2022
Paris
SP
30172-515
5
Tony Bannon
Tony.Bannon@gmail.com
Speedy Express
$1,655.00
9153 Bannon St.
702-2711
express.speedy@gmail.com
5/4/2020
5/6/2020
Paris
SP
23756-326
6
Joe Bannon
Joe.Bannon@gmail.com
Flash Delivery
$1,189.00
1069 Peters St.
160-5438
flash@gmail.com
9/21/2021
9/23/2021
York
RT
19907-750
7
Chris Johnson
Chris.Johnson@gmail.com
Logitrax
$4,013.00
3579 Peters St.
802-1713
logitrax@gmail.com
3/9/2020
3/13/2020
Paris
CS
47439-901
8
Aaron Adams
Aaron.Adams@gmail.com
Logitrax
$508.00
3357 White St.
409-2709
logitrax@gmail.com
7/25/2021
7/27/2021
Cairo
SP
67103-196
9
Sue Adams
Sue.Adams@gmail.com
Flash Delivery
$3,889.00
7869 Peters St.
703-6166
flash@gmail.com
9/25/2023
9/29/2023
York
SC
17543-645
10
Mark White
Mark.White@gmail.com
Logitrax
$3,849.00
2455 White St.
147-6282
logitrax@gmail.com
8/10/2020
8/11/2020
Sidney
RT
84949-778
11
Tom Wong
Tom.Wong@gmail.com
Logitrax
$3,632.00
3850 Brown St.
455-8616
logitrax@gmail.com
12/7/2020
12/11/2020
York
RS
33994-277
12
Joe White
Joe.White@gmail.com
Flash Delivery
$2,074.00
137 Smith St.
122-7823
flash@gmail.com
10/7/2022
10/11/2022
Florence
SP
26631-481
13
Mark Richards
Mark.Richards@gmail.com
Flash Delivery
$1,617.00
2774 White St.
795-6570
flash@gmail.com
9/2/2022
9/5/2022
Rome
RS
70900-506
14
Aaron Brown
Aaron.Brown@gmail.com
Flash Delivery
$4,183.00
3667 Brown St.
502-8309
flash@gmail.com
10/31/2024
11/2/2024
York
SC
99195-410
15
Tom Adams
Tom.Adams@gmail.com
Logitrax
$2,476.00
5343 Wong St.
474-2638
logitrax@gmail.com
4/30/2025
5/3/2025
Hamburg
RN
49851-433
16
Aaron Johnson
Aaron.Johnson@gmail.com
Flash Delivery
$3,933.00
5860 Smith St.
385-5068
flash@gmail.com
7/13/2019
7/16/2019
Rome
RN
78744-898
17
Bill White
Bill.White@gmail.com
Logitrax
$2,956.00
8910 Smith St.
365-4064
logitrax@gmail.com
4/21/2022
4/23/2022
Hamburg
RN
45467-904
18
Tom Wong
Tom.Wong@gmail.com
Flash Delivery
$1,571.00
3850 Brown St.
455-8616
flash@gmail.com
6/1/2019
6/2/2019
York
RS
33994-277
19
Frank Peters
Frank.Peters@gmail.com
Speedy Express
$3,555.00
1802 Richards St.
141-2900
express.speedy@gmail.com
10/9/2020
10/13/2020
Cairo
SP
60515-694
20
Sue White
Sue.White@gmail.com
Flash Delivery
$4,753.00
4835 Smith St.
716-3811
flash@gmail.com
12/5/2019
12/8/2019
Paris
SC
39920-152
21
Paul Bannon
Paul.Bannon@gmail.com
Logitrax
$545.00
4569 White St.
228-2538
logitrax@gmail.com
11/2/2023
11/3/2023
Sidney
SP
94340-466
22
Paul Peters
Paul.Peters@gmail.com
Logitrax
$1,884.00
5308 Brown St.
503-3703
logitrax@gmail.com
9/30/2018
10/2/2018
Florence
CS
35197-233
23
Chris Bannon
Chris.Bannon@gmail.com
Speedy Express
$1,169.00
1362 Richards St.
396-8712
express.speedy@gmail.com
2/7/2019
2/8/2019
Sidney
SC
63101-740
24
Sue White
Sue.White@gmail.com
Logitrax
$4,909.00
4835 Smith St.
716-3811
logitrax@gmail.com
6/12/2018
6/16/2018
Paris
SC
39920-152
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) } |