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
Jan/21/2015
6:43 PM
Germany
231
1,785.61
4,837.23
1
Apr/21/2015
6:45 AM
Italy
818
8,376.42
4,380.05
2
Feb/23/2015
2:52 AM
Greece
766
1,637.45
3,730.51
3
Oct/21/2015
9:33 PM
US
417
3,531.98
1,920.09
4
Nov/16/2015
6:49 PM
Italy
993
6,999.74
4,025.81
5
Feb/22/2015
12:20 PM
UK
799
7,386.93
1,562.41
6
Oct/09/2015
5:52 PM
Japan
400
9,159.88
4,496.52
7
Aug/09/2015
12:50 AM
UK
559
1,985.68
822.79
8
Oct/23/2015
4:18 PM
UK
105
3,605.66
3,452.35
9
Jan/15/2015
12:11 PM
UK
387
8,932.99
1,585.00
10
Dec/24/2015
4:52 PM
Japan
253
3,801.93
2,232.78
11
Jul/20/2015
6:09 PM
Germany
327
7,982.25
326.29
12
Dec/04/2015
9:31 PM
UK
292
3,406.08
672.10
13
Dec/10/2015
1:19 AM
US
770
3,789.44
4,368.43
14
Feb/23/2015
10:31 PM
US
703
6,622.81
157.42

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