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
May/09/2015
3:43 PM
Greece
820
2,329.25
2,263.15
1
Nov/23/2015
3:16 PM
Greece
96
9,479.85
2,588.87
2
Apr/16/2015
10:41 PM
Greece
758
4,642.36
4,972.70
3
Jun/09/2015
8:18 AM
Greece
72
7,351.48
1,731.32
4
Mar/10/2015
9:46 PM
Japan
135
2,163.51
638.24
5
Mar/10/2015
2:41 AM
Italy
824
1,376.20
2,283.09
6
Apr/11/2015
9:16 PM
Germany
205
4,237.95
4,355.17
7
Feb/06/2015
9:18 PM
UK
577
4,816.10
3,435.10
8
Oct/22/2015
12:40 AM
Germany
786
4,940.03
545.40
9
Jun/19/2015
9:05 AM
Italy
352
4,269.27
3,082.40

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