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
Jul/07/2015
2:33 AM
UK
444
1,705.08
2,354.22
1
Jul/24/2015
10:52 PM
Japan
949
601.18
757.68
2
Nov/14/2015
8:03 AM
Japan
228
3,011.51
597.00
3
Jun/22/2015
7:53 PM
US
319
4,519.75
2,979.34
4
Jul/17/2015
10:56 AM
Italy
510
4,118.34
705.59
5
Oct/19/2015
11:12 AM
US
605
2,483.10
2,001.41
6
May/25/2015
12:58 AM
UK
570
7,906.53
3,201.88
7
Mar/24/2015
3:36 PM
Italy
468
5,408.38
2,472.51
8
Apr/25/2015
5:02 PM
Germany
546
8,894.91
631.67
9
Nov/03/2015
8:19 AM
Greece
557
9,499.48
1,816.41

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