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/21/2015
4:35 AM
UK
839
5,655.85
1,109.02
1
Apr/05/2015
12:38 PM
Greece
11
7,720.69
1,088.27
2
May/17/2015
4:01 AM
US
246
540.88
3,726.93
3
Oct/18/2015
10:28 AM
US
939
3,343.04
2,234.41
4
Apr/21/2015
4:42 AM
Italy
782
3,690.39
3,780.52
5
Jun/09/2015
7:41 AM
Greece
477
4,269.45
2,762.63
6
Sep/15/2015
12:54 PM
UK
282
7,822.79
2,267.28
7
Nov/01/2015
11:43 AM
US
639
4,711.13
4,203.72
8
Apr/25/2015
11:23 PM
US
302
8,606.95
1,581.81
9
Oct/16/2015
11:41 PM
Japan
122
7,497.51
2,155.07
10
May/23/2015
2:25 AM
Germany
713
4,529.71
3,886.56
11
Jun/13/2015
5:08 PM
UK
881
2,090.15
1,544.92
12
Jun/10/2015
9:18 PM
Italy
577
162.44
1,498.01
13
Jun/12/2015
5:41 PM
Greece
182
5,414.54
4,377.83
14
Dec/25/2015
5:43 AM
Italy
336
6,181.76
683.37

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