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/09/2015
5:33 PM
US
590
8,962.16
721.08
1
Jan/03/2015
12:32 PM
Japan
603
2,432.46
3,537.78
2
Jul/21/2015
12:00 PM
Germany
76
2,945.90
930.17
3
Jun/10/2015
2:52 PM
US
707
9,020.54
4,720.26
4
Mar/08/2015
12:11 PM
UK
173
324.19
4,965.26
5
Jan/08/2015
1:37 AM
US
609
4,933.13
126.18
6
Jan/08/2015
1:26 PM
Japan
917
6,095.67
1,705.71
7
Dec/25/2015
2:33 AM
Greece
554
1,453.05
3,258.94
8
Feb/09/2015
1:39 AM
UK
611
4,154.63
776.03
9
Apr/22/2015
8:12 PM
Italy
753
7,020.88
3,883.33
10
Oct/22/2015
8:06 PM
US
764
979.94
4,702.68
11
Sep/06/2015
11:32 AM
Japan
825
8,168.46
2,281.78
12
Mar/11/2015
4:51 PM
Germany
704
3,404.63
952.21
13
Jul/15/2015
5:33 AM
UK
461
1,894.96
802.33
14
May/16/2015
2:26 AM
Germany
3
2,927.81
1,476.49

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