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
Jun/24/2015
5:53 PM
UK
185
7,706.60
79.19
1
Sep/19/2015
6:22 PM
Japan
15
8,578.21
337.58
2
Aug/25/2015
1:23 AM
Germany
94
7,517.66
747.23
3
Aug/01/2015
12:45 AM
Germany
978
8,128.96
1,294.20
4
Oct/01/2015
8:18 AM
Greece
330
100.11
849.93
5
Oct/09/2015
12:35 AM
US
586
7,161.01
1,751.27
6
Jun/21/2015
1:19 AM
Italy
405
2,441.20
3,868.15
7
Apr/24/2015
8:39 AM
Italy
731
8,141.42
3,379.86
8
Sep/12/2015
3:57 PM
Germany
721
9,624.31
4,863.73
9
Sep/12/2015
10:39 AM
Japan
871
7,171.57
1,673.42
10
Jan/15/2015
7:57 AM
UK
487
8,767.08
3,554.65
11
Jun/17/2015
6:34 AM
UK
325
2,252.65
3,475.22
12
Apr/14/2015
8:21 PM
Japan
779
2,584.34
440.74
13
Mar/22/2015
1:16 AM
UK
326
2,083.68
2,523.37
14
Mar/01/2015
10:22 AM
Italy
361
8,721.95
1,418.74

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