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
Nov/02/2015
7:05 PM
Japan
738
9,432.89
2,693.19
1
Dec/07/2015
5:35 PM
Japan
180
6,139.56
2,635.73
2
Feb/22/2015
12:20 PM
Japan
939
2,460.78
3,627.09
3
Aug/07/2015
6:17 AM
Germany
865
594.36
3,887.60
4
Jan/22/2015
12:29 PM
UK
272
8,612.30
1,292.17
5
Jul/22/2015
6:57 PM
Japan
514
487.98
2,309.52
6
Feb/01/2015
10:27 AM
Germany
106
8,449.43
4,378.82
7
Aug/21/2015
11:32 AM
Italy
309
20.46
2,308.50
8
Aug/16/2015
6:41 PM
Italy
686
5,094.69
1,015.02
9
Nov/10/2015
11:56 AM
Italy
900
3,309.24
355.07
10
Jan/18/2015
9:29 PM
Greece
823
4,020.82
4,141.74
11
Apr/15/2015
7:13 AM
UK
149
4,054.85
236.47
12
Sep/17/2015
7:08 PM
Japan
647
535.97
2,888.32
13
Oct/14/2015
3:08 PM
UK
917
9,980.76
2,562.63
14
Feb/21/2015
2:13 AM
UK
437
2,580.68
4,047.81

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