ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexGrid

Overview

This sample demonstrates how to export and import a wijmo5 flexgrid to excel file.

Features

Id
Date
Time
Country
Downloads
Sales
Expenses
Checked
0
Sep/03/2015
6:34 AM
Germany
684
5,688.69
1,517.63
1
Jul/10/2015
2:04 AM
Greece
7
8,465.94
3,790.88
2
Feb/23/2015
3:28 AM
Greece
706
8,897.68
4,746.22
3
Feb/21/2015
11:43 AM
US
48
5,830.99
1,495.47
4
Oct/12/2015
5:28 AM
Japan
168
9,427.15
1,475.67
5
May/02/2015
11:29 AM
UK
910
8,006.40
835.60
6
May/24/2015
1:18 PM
Italy
187
4,236.00
1,034.68
7
Jul/22/2015
10:59 AM
Italy
982
7,817.70
3,879.37
8
Mar/25/2015
6:24 PM
Japan
301
7,070.75
1,981.00
9
May/12/2015
12:14 AM
Greece
857
4,355.35
4,047.09
10
Feb/06/2015
2:18 PM
US
421
7,303.23
583.86
11
Mar/16/2015
2:28 AM
Greece
990
7,021.13
1,772.02
12
Feb/14/2015
12:31 PM
US
406
6,293.73
1,131.62
13
Dec/21/2015
8:06 AM
Italy
523
9,369.39
4,782.63
14
Nov/20/2015
8:58 PM
UK
85
8,550.45
1,899.97

Settings


Export & Import
Export Name :           

Description

This sample demonstrates how to export and import a wijmo5 flexgrid 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 _flexGridModel = new GridExportImportOptions
        {
            NeedExport = true,
            NeedImport = true,
            IncludeColumnHeaders = true
        };
  
        public IActionResult Index()
        {
            ViewBag.Options = _flexGridModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@{
    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)');
    initializeFlexGrid(grid);
</script>
@section Description{
    @Html.Raw(Wijmo5FlexGrid.Index_Text0)
}