ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexGrid

Paging

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
Apr/15/2015
3:22 AM
Japan
367
8,989.75
267.17
1
Aug/05/2015
5:13 AM
Greece
631
6,255.93
2,964.92
2
Aug/17/2015
3:49 AM
Italy
734
1,108.77
4,371.24
3
Jul/10/2015
9:08 PM
UK
863
2,459.33
14.53
4
Nov/07/2015
1:57 PM
Greece
30
2,112.05
2,639.94
5
Aug/13/2015
8:40 PM
UK
27
243.92
3,092.04
6
Dec/23/2015
2:01 PM
US
56
6,986.16
4,923.30
7
Feb/10/2015
12:41 PM
UK
777
5,883.67
187.67
8
Apr/20/2015
3:15 AM
UK
553
5,973.03
1,077.46
9
Nov/22/2015
11:33 PM
Italy
233
3,685.83
2,540.14

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