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/13/2015
1:39 AM
Germany
35
746.35
3,050.08
1
Feb/02/2015
1:59 PM
Italy
734
2,836.39
4,131.31
2
Aug/09/2015
8:14 AM
Germany
810
6,318.30
3,274.81
3
Nov/06/2015
12:52 AM
Italy
336
3,245.26
4,356.87
4
Sep/22/2015
7:32 AM
Germany
753
9,910.71
2,076.78
5
Jun/09/2015
6:24 AM
Germany
527
9,439.76
3,489.48
6
Oct/15/2015
11:08 AM
Greece
398
5,415.93
4,798.60
7
Apr/05/2015
7:25 PM
Germany
180
2,279.53
4,007.96
8
Mar/25/2015
2:59 PM
Italy
311
7,461.86
4,960.94
9
Apr/16/2015
5:14 PM
Japan
521
940.69
1,987.82
10
Nov/25/2015
7:06 AM
Greece
150
2,897.31
3,078.36
11
Jul/05/2015
4:41 AM
Japan
48
2,645.02
1,912.75
12
Feb/19/2015
9:44 PM
US
14
6,765.24
2,160.28
13
Nov/10/2015
10:41 PM
Greece
859
7,207.53
1,003.23
14
Jul/12/2015
11:24 AM
Japan
533
5,180.68
4,772.51

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
22
23
24
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.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 ActionResult Filtering()
        {
            ViewBag.Options = _flexGridFilteringModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@using WebApiExplorer.Models
@{
    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(Resources.Wijmo5FlexGrid.Filtering_Text0)
}