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 Brown
Bill.Brown@gmail.com
Speedy Express
$2,500.00
5140 Smith St.
131-8302
express.speedy@gmail.com
7/5/2024
7/9/2024
Cairo
RN
20777-522
1
Sue Johnson
Sue.Johnson@gmail.com
Logitrax
$2,839.00
7474 Johnson St.
693-1746
logitrax@gmail.com
9/14/2022
9/16/2022
Florence
CS
34962-160
2
Bill Johnson
Bill.Johnson@gmail.com
Flash Delivery
$4,789.00
5115 Wong St.
505-8427
flash@gmail.com
6/6/2019
6/9/2019
Cairo
SC
68911-589
3
Paul Peters
Paul.Peters@gmail.com
Flash Delivery
$3,055.00
4293 Johnson St.
511-6756
flash@gmail.com
1/30/2023
2/1/2023
Cairo
RT
75284-934
4
John Adams
John.Adams@gmail.com
Logitrax
$3,697.00
8816 Brown St.
933-8470
logitrax@gmail.com
1/31/2019
2/2/2019
Cairo
SP
17068-716
5
Brad Smith
Brad.Smith@gmail.com
Speedy Express
$1,046.00
3044 Johnson St.
939-7492
express.speedy@gmail.com
2/3/2018
2/5/2018
Rome
CS
69448-843
6
Paul Peters
Paul.Peters@gmail.com
Logitrax
$1,185.00
4293 Johnson St.
511-6756
logitrax@gmail.com
6/27/2017
7/1/2017
Cairo
RT
75284-934
7
Aaron Smith
Aaron.Smith@gmail.com
Speedy Express
$3,072.00
2228 Peters St.
845-9895
express.speedy@gmail.com
4/13/2018
4/16/2018
Paris
SP
97354-944
8
Aaron Wong
Aaron.Wong@gmail.com
Speedy Express
$3,486.00
2572 Peters St.
221-2775
express.speedy@gmail.com
3/8/2022
3/9/2022
York
SC
71683-988
9
Aaron Wong
Aaron.Wong@gmail.com
Logitrax
$1,296.00
2572 Peters St.
221-2775
logitrax@gmail.com
3/7/2020
3/10/2020
York
SC
71683-988
10
Tony Adams
Tony.Adams@gmail.com
Logitrax
$2,792.00
6937 Brown St.
475-1703
logitrax@gmail.com
7/22/2024
7/25/2024
Paris
RT
58960-587
11
Tony Smith
Tony.Smith@gmail.com
Flash Delivery
$4,580.00
4822 Richards St.
172-9503
flash@gmail.com
2/21/2020
2/22/2020
Florence
CS
79466-976
12
Mark Peters
Mark.Peters@gmail.com
Logitrax
$4,268.00
6605 Adams St.
613-2605
logitrax@gmail.com
6/16/2025
6/17/2025
Rome
RT
96603-230
13
Sue Peters
Sue.Peters@gmail.com
Logitrax
$4,413.00
2439 Smith St.
132-3551
logitrax@gmail.com
5/3/2019
5/5/2019
York
RN
28916-512
14
Bill Richards
Bill.Richards@gmail.com
Speedy Express
$2,818.00
561 Brown St.
161-8655
express.speedy@gmail.com
12/13/2019
12/16/2019
York
CS
65530-412
15
Tony Adams
Tony.Adams@gmail.com
Speedy Express
$2,534.00
6937 Brown St.
475-1703
express.speedy@gmail.com
10/29/2020
11/2/2020
Paris
RT
58960-587
16
John Smith
John.Smith@gmail.com
Speedy Express
$4,765.00
1127 Johnson St.
614-5178
express.speedy@gmail.com
1/10/2023
1/11/2023
Hamburg
SP
60930-203
17
Mark Peters
Mark.Peters@gmail.com
Speedy Express
$4,242.00
5860 Bannon St.
669-2030
express.speedy@gmail.com
6/4/2023
6/6/2023
Florence
SC
64756-984
18
Brad Smith
Brad.Smith@gmail.com
Speedy Express
$3,156.00
3044 Johnson St.
939-7492
express.speedy@gmail.com
12/24/2018
12/27/2018
Rome
CS
69448-843
19
Tony Adams
Tony.Adams@gmail.com
Flash Delivery
$2,723.00
6937 Brown St.
475-1703
flash@gmail.com
6/19/2023
6/21/2023
Paris
RT
58960-587
20
Joe Johnson
Joe.Johnson@gmail.com
Logitrax
$3,464.00
961 Johnson St.
261-1454
logitrax@gmail.com
2/13/2023
2/16/2023
Cairo
RS
36615-611
21
John Adams
John.Adams@gmail.com
Flash Delivery
$3,570.00
1554 Wong St.
459-4658
flash@gmail.com
4/26/2022
4/27/2022
Rome
RN
57851-798
22
Chris Adams
Chris.Adams@gmail.com
Speedy Express
$2,728.00
3129 Adams St.
967-3733
express.speedy@gmail.com
4/18/2018
4/21/2018
Rome
CS
63828-444
23
Mark Peters
Mark.Peters@gmail.com
Flash Delivery
$4,082.00
6605 Adams St.
613-2605
flash@gmail.com
12/26/2017
12/27/2017
Rome
RT
96603-230
24
Joe Johnson
Joe.Johnson@gmail.com
Logitrax
$3,748.00
961 Johnson St.
261-1454
logitrax@gmail.com
12/8/2022
12/11/2022
Cairo
RS
36615-611
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) } |