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
Apr/08/2015
11:07 AM
Japan
502
3,826.62
2,192.75
1
Jun/25/2015
1:54 PM
US
976
1,933.46
1,815.62
2
Jan/22/2015
12:56 AM
Germany
564
6,258.74
2,532.77
3
May/22/2015
2:41 AM
Germany
975
7,033.81
2,092.43
4
Jan/11/2015
8:41 PM
US
247
5,813.69
2,934.93
5
Oct/12/2015
10:59 AM
UK
105
2,780.60
2,879.95
6
May/04/2015
8:22 AM
UK
204
9,764.47
1,191.86
7
Nov/18/2015
7:22 AM
Germany
962
8,842.54
1,698.24
8
Sep/12/2015
10:36 PM
UK
482
3,756.76
1,504.40
9
Aug/05/2015
1:58 PM
Greece
208
4,554.42
219.39
10
Sep/02/2015
9:19 PM
Germany
991
5,574.78
4,166.73
11
Nov/05/2015
6:55 PM
US
543
5,787.87
2,992.26
12
May/07/2015
9:01 AM
Italy
261
1,060.80
504.84
13
Sep/02/2015
3:32 AM
Greece
884
5,450.33
2,077.61
14
Apr/03/2015
3:06 PM
Japan
414
9,042.27
2,312.50

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)
}