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/17/2015
3:19 AM
Germany
311
9,941.56
3,565.19
1
Jun/01/2015
2:23 AM
US
390
8,390.33
4,342.58
2
Jul/06/2015
5:15 AM
Germany
720
3,290.45
2,462.56
3
Nov/11/2015
12:22 PM
Germany
613
8,387.23
4,601.20
4
Jun/15/2015
3:55 AM
UK
856
9,389.59
2,111.22
5
Jan/13/2015
8:59 AM
Greece
543
384.22
864.11
6
Jul/10/2015
10:34 PM
Japan
86
4,868.38
1,204.88
7
Oct/10/2015
2:03 PM
Germany
931
6,987.88
3,140.98
8
Mar/05/2015
4:44 AM
Greece
623
7,562.65
4,525.53
9
Aug/09/2015
12:38 AM
US
565
7,790.61
3,240.36
10
Nov/01/2015
3:43 PM
Japan
753
2,315.90
4,304.90
11
Sep/20/2015
6:03 AM
Germany
302
9,111.94
443.38
12
Dec/23/2015
7:54 PM
Japan
27
4,652.36
2,269.97
13
Jan/19/2015
4:48 PM
Germany
480
9,431.70
3,328.42
14
Apr/15/2015
1:03 PM
Germany
736
5,038.94
173.39

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