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
Aug/14/2015
6:14 PM
Germany
163
8,997.40
2,636.07
1
Dec/19/2015
1:08 PM
Greece
917
6,512.83
1,447.08
2
May/03/2015
10:51 PM
Italy
965
6,940.94
4,015.09
3
Aug/10/2015
9:25 PM
UK
112
4,352.37
1,991.11
4
Jun/02/2015
7:48 PM
Greece
3
3,155.06
675.99
5
Oct/07/2015
11:09 PM
Greece
102
6,273.69
4,664.67
6
Jun/21/2015
8:27 AM
UK
932
7,735.69
4,681.63
7
Jan/15/2015
10:01 AM
Germany
930
1,543.10
4,747.67
8
Jan/21/2015
3:23 AM
Germany
40
1,855.07
1,708.25
9
Nov/05/2015
10:35 PM
Italy
295
6,832.53
3,427.96
10
Nov/24/2015
6:58 AM
Japan
355
9,704.27
2,883.61
11
Jul/15/2015
9:50 AM
Greece
681
8,078.06
442.33
12
Dec/23/2015
5:18 AM
UK
488
6,020.04
4,967.49
13
May/20/2015
3:20 AM
Japan
631
4,619.23
2,369.86
14
May/23/2015
5:14 AM
Japan
22
7,421.57
2,775.30

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