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
Bill Bannon
Bill.Bannon@gmail.com
Logitrax
$3,246.00
7587 Johnson St.
577-1741
logitrax@gmail.com
8/8/2021
8/11/2021
Cairo
SP
87092-668
1
Joe Brown
Joe.Brown@gmail.com
Speedy Express
$2,847.00
3922 Smith St.
273-8709
express.speedy@gmail.com
10/16/2022
10/17/2022
Rome
SC
62291-117
2
John Richards
John.Richards@gmail.com
Flash Delivery
$3,415.00
1237 Smith St.
884-5900
flash@gmail.com
7/26/2023
7/27/2023
Rome
SP
26485-203
3
Joe Brown
Joe.Brown@gmail.com
Speedy Express
$743.00
3922 Smith St.
273-8709
express.speedy@gmail.com
12/5/2017
12/8/2017
Rome
SC
62291-117
4
Chris Richards
Chris.Richards@gmail.com
Speedy Express
$4,974.00
6221 Brown St.
755-8318
express.speedy@gmail.com
12/9/2020
12/12/2020
York
RS
71634-294
5
Joe Brown
Joe.Brown@gmail.com
Flash Delivery
$4,242.00
3922 Smith St.
273-8709
flash@gmail.com
10/10/2020
10/11/2020
Rome
SC
62291-117
6
Brad Brown
Brad.Brown@gmail.com
Flash Delivery
$3,178.00
540 Brown St.
663-2095
flash@gmail.com
2/1/2024
2/4/2024
Cairo
RT
28309-814
7
Chris Johnson
Chris.Johnson@gmail.com
Speedy Express
$859.00
3520 Brown St.
243-1787
express.speedy@gmail.com
6/1/2024
6/5/2024
Sidney
RT
51270-897
8
Mark Bannon
Mark.Bannon@gmail.com
Speedy Express
$251.00
8485 Richards St.
729-4223
express.speedy@gmail.com
7/22/2019
7/26/2019
Sidney
RS
85489-272
9
Sue White
Sue.White@gmail.com
Logitrax
$1,257.00
3832 Peters St.
112-1611
logitrax@gmail.com
4/13/2018
4/16/2018
Sidney
SP
95532-254
10
Mark Smith
Mark.Smith@gmail.com
Speedy Express
$4,312.00
5859 Peters St.
457-9372
express.speedy@gmail.com
7/11/2022
7/13/2022
Florence
RT
54127-972
11
Brad Johnson
Brad.Johnson@gmail.com
Speedy Express
$4,548.00
2170 Bannon St.
212-6179
express.speedy@gmail.com
12/25/2017
12/28/2017
Hamburg
RS
67205-135
12
Paul White
Paul.White@gmail.com
Speedy Express
$1,716.00
8933 Bannon St.
888-1077
express.speedy@gmail.com
5/3/2024
5/4/2024
Hamburg
RS
78696-918
13
John Bannon
John.Bannon@gmail.com
Flash Delivery
$2,479.00
3129 Smith St.
851-6231
flash@gmail.com
10/25/2019
10/27/2019
Hamburg
CS
82593-402
14
Brad Bannon
Brad.Bannon@gmail.com
Flash Delivery
$2,169.00
4555 Smith St.
765-8516
flash@gmail.com
8/16/2017
8/19/2017
Cairo
CS
66549-264
15
John Bannon
John.Bannon@gmail.com
Flash Delivery
$3,014.00
3129 Smith St.
851-6231
flash@gmail.com
8/9/2020
8/12/2020
Hamburg
CS
82593-402
16
Brad Johnson
Brad.Johnson@gmail.com
Speedy Express
$3,764.00
2170 Bannon St.
212-6179
express.speedy@gmail.com
4/24/2025
4/28/2025
Hamburg
RS
67205-135
17
Chris Johnson
Chris.Johnson@gmail.com
Flash Delivery
$1,716.00
7959 Wong St.
324-2844
flash@gmail.com
9/15/2019
9/18/2019
Rome
SP
79716-338
18
Sue White
Sue.White@gmail.com
Speedy Express
$4,136.00
2794 White St.
864-1510
express.speedy@gmail.com
4/24/2021
4/25/2021
Paris
CS
12238-343
19
Frank Richards
Frank.Richards@gmail.com
Flash Delivery
$1,207.00
5853 White St.
565-3641
flash@gmail.com
12/26/2020
12/29/2020
Paris
CS
13180-761
20
Chris Johnson
Chris.Johnson@gmail.com
Logitrax
$3,010.00
3520 Brown St.
243-1787
logitrax@gmail.com
3/29/2022
3/30/2022
Sidney
RT
51270-897
21
Frank Peters
Frank.Peters@gmail.com
Flash Delivery
$4,500.00
4251 Bannon St.
208-2767
flash@gmail.com
3/7/2019
3/8/2019
Hamburg
CS
58724-498
22
Joe Johnson
Joe.Johnson@gmail.com
Speedy Express
$1,391.00
8881 Wong St.
902-5938
express.speedy@gmail.com
5/2/2022
5/3/2022
Florence
RS
37996-717
23
Chris Richards
Chris.Richards@gmail.com
Flash Delivery
$4,926.00
6221 Brown St.
755-8318
flash@gmail.com
12/11/2023
12/13/2023
York
RS
71634-294
24
Chris Johnson
Chris.Johnson@gmail.com
Logitrax
$1,589.00
7959 Wong St.
324-2844
logitrax@gmail.com
3/23/2017
3/24/2017
Rome
SP
79716-338
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) } |