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
Aaron Johnson
Aaron.Johnson@gmail.com
Flash Delivery
$118.00
9624 White St.
763-6294
flash@gmail.com
9/29/2019
10/1/2019
Rome
RT
67061-644
1
Tony White
Tony.White@gmail.com
Speedy Express
$1,169.00
376 Smith St.
387-4820
express.speedy@gmail.com
6/17/2023
6/18/2023
York
RT
84954-674
2
John Richards
John.Richards@gmail.com
Flash Delivery
$567.00
7738 Brown St.
285-1870
flash@gmail.com
7/31/2020
8/4/2020
Florence
SP
59655-131
3
Chris Adams
Chris.Adams@gmail.com
Speedy Express
$1,871.00
592 Brown St.
856-7035
express.speedy@gmail.com
7/28/2018
7/29/2018
Sidney
RT
41765-400
4
Bill Wong
Bill.Wong@gmail.com
Flash Delivery
$1,330.00
6408 White St.
611-8507
flash@gmail.com
8/31/2021
9/4/2021
Hamburg
CS
54871-803
5
Bill White
Bill.White@gmail.com
Speedy Express
$3,849.00
2510 Wong St.
548-3770
express.speedy@gmail.com
5/15/2017
5/17/2017
Paris
SC
98872-763
6
Paul Brown
Paul.Brown@gmail.com
Speedy Express
$2,376.00
5413 Adams St.
572-9526
express.speedy@gmail.com
9/14/2023
9/17/2023
Rome
SP
58716-691
7
John Wong
John.Wong@gmail.com
Flash Delivery
$922.00
3989 Richards St.
761-8498
flash@gmail.com
7/31/2017
8/4/2017
Rome
RS
19823-379
8
Brad White
Brad.White@gmail.com
Flash Delivery
$4,218.00
746 Johnson St.
134-3055
flash@gmail.com
6/19/2019
6/20/2019
Rome
RT
71729-774
9
Aaron Johnson
Aaron.Johnson@gmail.com
Flash Delivery
$3,839.00
9624 White St.
763-6294
flash@gmail.com
5/8/2020
5/10/2020
Rome
RT
67061-644
10
Paul Johnson
Paul.Johnson@gmail.com
Speedy Express
$3,165.00
9529 Peters St.
953-5214
express.speedy@gmail.com
1/19/2020
1/23/2020
Hamburg
RT
95648-171
11
Paul Brown
Paul.Brown@gmail.com
Logitrax
$4,044.00
5413 Adams St.
572-9526
logitrax@gmail.com
5/22/2019
5/23/2019
Rome
SP
58716-691
12
Tom Brown
Tom.Brown@gmail.com
Logitrax
$1,939.00
6443 Adams St.
366-2008
logitrax@gmail.com
10/19/2017
10/21/2017
Sidney
CS
34465-919
13
Paul White
Paul.White@gmail.com
Flash Delivery
$911.00
8951 Bannon St.
336-8979
flash@gmail.com
9/18/2017
9/21/2017
York
RN
63950-572
14
Brad Wong
Brad.Wong@gmail.com
Speedy Express
$641.00
9948 Johnson St.
481-9393
express.speedy@gmail.com
7/7/2017
7/11/2017
Paris
RT
16277-265
15
Brad Wong
Brad.Wong@gmail.com
Logitrax
$269.00
9948 Johnson St.
481-9393
logitrax@gmail.com
2/11/2022
2/12/2022
Paris
RT
16277-265
16
Bill Wong
Bill.Wong@gmail.com
Flash Delivery
$1,478.00
6408 White St.
611-8507
flash@gmail.com
4/20/2020
4/23/2020
Hamburg
CS
54871-803
17
John Brown
John.Brown@gmail.com
Speedy Express
$2,148.00
914 Peters St.
823-5467
express.speedy@gmail.com
9/15/2021
9/16/2021
Sidney
RS
73344-742
18
Joe Wong
Joe.Wong@gmail.com
Flash Delivery
$1,247.00
6801 Wong St.
392-1798
flash@gmail.com
5/23/2019
5/24/2019
York
SP
22619-204
19
Frank Bannon
Frank.Bannon@gmail.com
Flash Delivery
$4,287.00
249 Johnson St.
370-4747
flash@gmail.com
9/4/2021
9/7/2021
Sidney
SC
65344-650
20
Tom Bannon
Tom.Bannon@gmail.com
Logitrax
$4,905.00
7300 Adams St.
645-1644
logitrax@gmail.com
8/12/2024
8/13/2024
Rome
SC
11576-382
21
Frank Smith
Frank.Smith@gmail.com
Logitrax
$4,844.00
8031 White St.
832-4597
logitrax@gmail.com
6/18/2019
6/21/2019
Cairo
RN
72370-132
22
Bill Bannon
Bill.Bannon@gmail.com
Speedy Express
$764.00
9673 Adams St.
680-9198
express.speedy@gmail.com
5/3/2020
5/4/2020
Cairo
RN
31295-663
23
Bill Richards
Bill.Richards@gmail.com
Flash Delivery
$983.00
9184 Wong St.
346-2770
flash@gmail.com
4/21/2022
4/25/2022
York
RT
61237-387
24
Aaron Johnson
Aaron.Johnson@gmail.com
Logitrax
$2,149.00
9624 White St.
763-6294
logitrax@gmail.com
12/4/2017
12/5/2017
Rome
RT
67061-644
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) } |