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 Richards
Bill.Richards@gmail.com
Speedy Express
$880.00
7313 Johnson St.
901-3297
express.speedy@gmail.com
12/29/2022
12/31/2022
Sidney
SP
48208-398
1
Bill Brown
Bill.Brown@gmail.com
Speedy Express
$989.00
1611 Johnson St.
513-5900
express.speedy@gmail.com
4/24/2019
4/25/2019
Rome
CS
89839-453
2
John Smith
John.Smith@gmail.com
Logitrax
$4,947.00
1989 Peters St.
566-4493
logitrax@gmail.com
2/17/2021
2/20/2021
Florence
RS
10818-154
3
Aaron Peters
Aaron.Peters@gmail.com
Logitrax
$1,874.00
5277 Brown St.
600-8064
logitrax@gmail.com
5/13/2024
5/16/2024
York
RT
13767-977
4
Bill Richards
Bill.Richards@gmail.com
Speedy Express
$211.00
7313 Johnson St.
901-3297
express.speedy@gmail.com
7/31/2019
8/2/2019
Sidney
SP
48208-398
5
Tom Brown
Tom.Brown@gmail.com
Flash Delivery
$908.00
7361 Richards St.
356-8383
flash@gmail.com
10/10/2022
10/11/2022
Florence
SC
31508-666
6
Joe Brown
Joe.Brown@gmail.com
Logitrax
$2,398.00
2957 Bannon St.
461-4665
logitrax@gmail.com
7/1/2019
7/4/2019
Rome
RS
12178-554
7
Tony Adams
Tony.Adams@gmail.com
Flash Delivery
$3,214.00
2558 White St.
227-1763
flash@gmail.com
6/20/2024
6/23/2024
Cairo
RN
75059-195
8
Tom Wong
Tom.Wong@gmail.com
Flash Delivery
$3,703.00
8433 Brown St.
534-2108
flash@gmail.com
10/17/2020
10/20/2020
Rome
RT
34195-181
9
Mark Johnson
Mark.Johnson@gmail.com
Flash Delivery
$3,035.00
6164 Brown St.
916-3808
flash@gmail.com
4/23/2023
4/24/2023
Paris
RT
78236-230
10
Aaron Peters
Aaron.Peters@gmail.com
Logitrax
$1,627.00
5277 Brown St.
600-8064
logitrax@gmail.com
10/10/2017
10/11/2017
York
RT
13767-977
11
Tony White
Tony.White@gmail.com
Logitrax
$2,507.00
2590 Wong St.
759-7064
logitrax@gmail.com
3/30/2025
4/1/2025
Cairo
RN
31822-437
12
Bill Richards
Bill.Richards@gmail.com
Flash Delivery
$2,083.00
7313 Johnson St.
901-3297
flash@gmail.com
10/20/2019
10/21/2019
Sidney
SP
48208-398
13
Tony Adams
Tony.Adams@gmail.com
Flash Delivery
$1,414.00
2558 White St.
227-1763
flash@gmail.com
9/2/2017
9/3/2017
Cairo
RN
75059-195
14
Tony White
Tony.White@gmail.com
Flash Delivery
$365.00
2590 Wong St.
759-7064
flash@gmail.com
4/18/2022
4/19/2022
Cairo
RN
31822-437
15
John Smith
John.Smith@gmail.com
Logitrax
$3,347.00
1989 Peters St.
566-4493
logitrax@gmail.com
12/25/2023
12/28/2023
Florence
RS
10818-154
16
Mark Johnson
Mark.Johnson@gmail.com
Flash Delivery
$180.00
6164 Brown St.
916-3808
flash@gmail.com
2/23/2023
2/25/2023
Paris
RT
78236-230
17
Sue Brown
Sue.Brown@gmail.com
Logitrax
$3,218.00
7460 Richards St.
181-6575
logitrax@gmail.com
8/19/2019
8/21/2019
Florence
CS
83444-179
18
Tony Bannon
Tony.Bannon@gmail.com
Logitrax
$955.00
7280 Richards St.
361-7191
logitrax@gmail.com
12/14/2019
12/16/2019
Paris
RS
19131-429
19
Tom Brown
Tom.Brown@gmail.com
Flash Delivery
$408.00
7361 Richards St.
356-8383
flash@gmail.com
4/23/2021
4/24/2021
Florence
SC
31508-666
20
Aaron Peters
Aaron.Peters@gmail.com
Speedy Express
$1,502.00
8900 Johnson St.
774-8775
express.speedy@gmail.com
11/19/2024
11/23/2024
Hamburg
RT
24775-327
21
Tony White
Tony.White@gmail.com
Logitrax
$4,303.00
2590 Wong St.
759-7064
logitrax@gmail.com
11/25/2017
11/29/2017
Cairo
RN
31822-437
22
Bill Bannon
Bill.Bannon@gmail.com
Flash Delivery
$2,002.00
9197 Wong St.
833-1434
flash@gmail.com
6/11/2021
6/15/2021
Hamburg
RT
52478-309
23
John Peters
John.Peters@gmail.com
Logitrax
$1,299.00
5168 Adams St.
825-9586
logitrax@gmail.com
8/3/2023
8/4/2023
Sidney
RN
29248-617
24
Chris White
Chris.White@gmail.com
Logitrax
$2,043.00
6362 Peters St.
636-6699
logitrax@gmail.com
11/8/2019
11/11/2019
Sidney
RT
41880-746
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) } |