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
Frank Brown
Frank.Brown@gmail.com
Flash Delivery
$546.00
908 Brown St.
906-5895
flash@gmail.com
10/5/2020
10/8/2020
Cairo
SP
62971-462
1
Brad Wong
Brad.Wong@gmail.com
Logitrax
$3,435.00
4869 White St.
696-2535
logitrax@gmail.com
10/30/2020
11/3/2020
Florence
RT
42254-757
2
Paul Richards
Paul.Richards@gmail.com
Flash Delivery
$1,380.00
5895 Bannon St.
358-5302
flash@gmail.com
7/6/2020
7/8/2020
Florence
CS
74208-747
3
Tom White
Tom.White@gmail.com
Flash Delivery
$701.00
5156 Peters St.
821-8464
flash@gmail.com
3/2/2024
3/6/2024
Sidney
RS
46915-250
4
Sue White
Sue.White@gmail.com
Flash Delivery
$3,463.00
3090 Bannon St.
376-3068
flash@gmail.com
3/7/2024
3/10/2024
Rome
RT
68901-617
5
John Bannon
John.Bannon@gmail.com
Logitrax
$3,392.00
3051 Richards St.
749-2016
logitrax@gmail.com
2/14/2024
2/18/2024
Sidney
RT
60554-222
6
Joe Peters
Joe.Peters@gmail.com
Flash Delivery
$3,194.00
4614 Peters St.
886-2079
flash@gmail.com
11/22/2024
11/23/2024
Rome
SP
30282-213
7
Bill Bannon
Bill.Bannon@gmail.com
Flash Delivery
$2,248.00
6119 Brown St.
807-2122
flash@gmail.com
12/15/2024
12/18/2024
York
RS
29527-145
8
Sue Richards
Sue.Richards@gmail.com
Speedy Express
$4,489.00
739 Wong St.
741-7954
express.speedy@gmail.com
2/23/2020
2/27/2020
Florence
SP
73950-884
9
Aaron Wong
Aaron.Wong@gmail.com
Flash Delivery
$486.00
1690 Richards St.
129-6004
flash@gmail.com
7/9/2025
7/10/2025
Rome
RN
92085-623
10
Tom Wong
Tom.Wong@gmail.com
Logitrax
$4,442.00
5797 Smith St.
245-2845
logitrax@gmail.com
2/7/2020
2/11/2020
Sidney
RS
99986-417
11
Paul White
Paul.White@gmail.com
Flash Delivery
$434.00
3305 Richards St.
293-6774
flash@gmail.com
5/17/2017
5/21/2017
York
RN
48421-973
12
Bill White
Bill.White@gmail.com
Flash Delivery
$3,798.00
9400 White St.
686-6581
flash@gmail.com
2/24/2020
2/25/2020
Florence
RT
89762-883
13
Joe Wong
Joe.Wong@gmail.com
Flash Delivery
$1,575.00
7407 Smith St.
283-1072
flash@gmail.com
9/18/2021
9/22/2021
Florence
RS
58793-246
14
Tony Adams
Tony.Adams@gmail.com
Logitrax
$1,509.00
8935 Brown St.
151-3895
logitrax@gmail.com
10/27/2020
10/29/2020
York
RN
30430-909
15
Sue White
Sue.White@gmail.com
Flash Delivery
$1,548.00
3090 Bannon St.
376-3068
flash@gmail.com
10/22/2022
10/25/2022
Rome
RT
68901-617
16
Sue Richards
Sue.Richards@gmail.com
Speedy Express
$1,724.00
739 Wong St.
741-7954
express.speedy@gmail.com
6/22/2017
6/26/2017
Florence
SP
73950-884
17
Paul Smith
Paul.Smith@gmail.com
Flash Delivery
$3,947.00
7042 Smith St.
874-3730
flash@gmail.com
8/17/2023
8/19/2023
Rome
SP
40382-674
18
Tom Richards
Tom.Richards@gmail.com
Logitrax
$4,533.00
2931 Adams St.
646-3771
logitrax@gmail.com
3/17/2024
3/20/2024
Paris
SP
83899-849
19
Sue Johnson
Sue.Johnson@gmail.com
Flash Delivery
$3,974.00
2222 Smith St.
844-1808
flash@gmail.com
1/13/2022
1/14/2022
Sidney
SP
56847-341
20
Joe Peters
Joe.Peters@gmail.com
Logitrax
$162.00
4614 Peters St.
886-2079
logitrax@gmail.com
11/26/2023
11/30/2023
Rome
SP
30282-213
21
Tom Wong
Tom.Wong@gmail.com
Flash Delivery
$1,715.00
5797 Smith St.
245-2845
flash@gmail.com
1/27/2024
1/30/2024
Sidney
RS
99986-417
22
Tom White
Tom.White@gmail.com
Flash Delivery
$330.00
5156 Peters St.
821-8464
flash@gmail.com
1/24/2023
1/27/2023
Sidney
RS
46915-250
23
Joe Peters
Joe.Peters@gmail.com
Flash Delivery
$1,819.00
4614 Peters St.
886-2079
flash@gmail.com
10/21/2018
10/25/2018
Rome
SP
30282-213
24
Tony Peters
Tony.Peters@gmail.com
Speedy Express
$528.00
3203 Richards St.
763-8370
express.speedy@gmail.com
11/12/2023
11/13/2023
Rome
CS
54122-363
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) } |