ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexGrid

Filtering

This sample demonstrates how to export and import a wijmo5 flexgrid with filter to excel file.

Features

Id
Date
Time
Country
Downloads
Sales
Expenses
Checked
0
May/10/2015
10:36 AM
UK
756
3,878.61
2,477.73
1
Jul/08/2015
3:44 PM
Germany
776
4,083.03
1,891.73
2
Jun/17/2015
9:25 AM
Japan
866
8,849.32
3,252.65
3
Sep/19/2015
1:07 PM
Japan
396
2,458.01
4,574.85
4
May/15/2015
12:54 AM
Italy
303
5,373.95
955.14
5
Mar/23/2015
6:27 AM
US
774
6,022.87
2,320.92
6
Oct/07/2015
5:08 PM
Italy
65
1,940.08
149.55
7
Sep/19/2015
10:52 PM
Germany
368
9,541.39
790.38
8
Sep/19/2015
4:58 AM
US
597
8,348.22
813.76
9
Apr/08/2015
3:03 PM
Japan
596
3,385.60
3,992.75
10
Oct/06/2015
7:19 PM
Italy
413
255.51
2,709.40
11
Nov/03/2015
10:30 AM
Greece
858
55.03
2,077.64
12
Oct/24/2015
7:38 AM
UK
625
8,301.44
4,217.21
13
Sep/14/2015
7:16 AM
Japan
359
6,804.80
330.99
14
Oct/04/2015
4:05 PM
US
702
9,812.76
1,281.52

Settings


Export
Export Name :

Description

This sample demonstrates how to export and import a wijmo5 flexgrid with filter to excel file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Microsoft.AspNetCore.Mvc;
using WebApiExplorer.Models;
  
namespace WebApiExplorer.Controllers
{
    public partial class Wijmo5FlexGridController : Controller
    {
        private readonly GridExportImportOptions _flexGridFilteringModel = new GridExportImportOptions
        {
            NeedExport = true,
            NeedImport = false,
            IncludeColumnHeaders = true
        };
  
        public IActionResult Filtering()
        {
            ViewBag.Options = _flexGridFilteringModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@{
    GridExportImportOptions optionsModel = ViewBag.Options;
    ViewBag.DemoSettings = true;
}
  
<div id="@(optionsModel.ControlId)" style="height:300px"></div>
@section Settings{
    @Html.Partial("_FlexGridOptions", optionsModel)
}
<script>
    var grid = new wijmo.grid.FlexGrid('#@(optionsModel.ControlId)'), filter;
    initializeFlexGrid(grid);
    filter = new wijmo.grid.filter.FlexGridFilter(grid);
</script>
@section Description{
    @Html.Raw(Wijmo5FlexGrid.Filtering_Text0)
}