ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexGrid

OverView

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

Features

Id
Date
Time
Country
Downloads
Sales
Expenses
Checked
0
Jul/11/2015
11:22 PM
Japan
711
4,529.38
1,173.46
1
Mar/25/2015
12:22 PM
Greece
347
8,879.50
4,638.95
2
Jun/16/2015
6:33 PM
UK
737
4,024.23
3,778.79
3
Oct/02/2015
5:54 PM
Italy
721
3,678.41
1,067.31
4
May/24/2015
9:15 PM
UK
784
2,653.45
3,663.51
5
Oct/03/2015
11:42 PM
Germany
316
2,229.51
4,603.93
6
Jan/11/2015
7:02 PM
Italy
996
3,823.82
4,462.66
7
Sep/05/2015
5:41 AM
Japan
178
3,383.29
2,448.76
8
Aug/01/2015
6:27 PM
UK
10
3,445.75
1,881.38
9
Dec/19/2015
1:52 AM
UK
866
5,336.13
2,746.58

Settings


Export
Export Name :

Description

This sample demonstrates how to export and import a paged 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
22
using Microsoft.AspNetCore.Mvc;
using WebApiExplorer.Models;
  
namespace WebApiExplorer.Controllers.Wijmo5FlexGrid
{
    public partial class Wijmo5FlexGridController : Controller
    {
        private readonly GridExportImportOptions _flexGridPagingModel = new GridExportImportOptions
        {
            NeedExport = true,
            NeedImport = false,
            IncludeColumnHeaders = true,
            OnlyCurrentPage = false
        };
  
        public IActionResult Paging()
        {
            ViewBag.Options = _flexGridPagingModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@{
    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);
    grid.collectionView.pageSize = 10;
</script>
<c1-pager owner="@optionsModel.ControlId"></c1-pager>
  
@section Description{
    @Html.Raw(Wijmo5FlexGrid.Paging_Text0)
}