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
Feb/21/2015
11:01 AM
Greece
376
2,509.63
747.76
1
Dec/13/2015
1:47 PM
Japan
770
5,676.95
4,106.24
2
Feb/09/2015
9:27 PM
Italy
775
948.54
705.18
3
Apr/21/2015
12:46 AM
UK
599
9,878.94
3,329.43
4
Apr/05/2015
8:33 AM
Germany
618
5,260.47
284.89
5
Jun/19/2015
2:40 AM
US
257
452.07
4,757.88
6
Oct/05/2015
11:11 AM
Germany
848
1,348.69
368.12
7
Aug/13/2015
11:01 AM
Italy
733
8,408.78
4,209.20
8
Sep/08/2015
3:20 PM
Greece
40
8,869.09
1,352.09
9
May/24/2015
2:29 PM
UK
136
2,594.79
802.31
10
Jan/12/2015
4:43 AM
UK
555
819.57
4,165.85
11
Jul/13/2015
7:36 AM
Italy
233
4,569.37
2,662.32
12
Jun/20/2015
1:29 AM
Japan
966
2,690.57
1,107.78
13
Oct/16/2015
1:33 PM
US
971
2,503.74
462.56
14
Feb/06/2015
8:46 AM
Italy
23
4,473.28
201.93

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