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
Feb/25/2015
7:11 AM
UK
782
3,600.84
3,040.58
1
May/17/2015
8:09 AM
Italy
193
7,218.59
932.82
2
Aug/19/2015
3:43 AM
Germany
875
5,991.70
2,435.28
3
Dec/20/2015
10:03 AM
UK
623
4,283.81
312.13
4
Oct/06/2015
1:02 AM
US
108
1,925.82
4,876.92
5
Jan/09/2015
3:29 AM
Germany
184
1,114.75
3,416.64
6
Feb/12/2015
4:59 AM
US
273
39.24
2,506.09
7
Mar/18/2015
2:40 PM
Greece
730
4,917.17
4,332.44
8
Dec/05/2015
12:25 PM
Greece
107
7,705.48
1,482.72
9
Oct/10/2015
3:08 PM
UK
867
3,963.73
1,373.77

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