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
Jan/15/2015
5:43 PM
Germany
147
596.16
1,384.31
1
Feb/24/2015
7:29 AM
Germany
187
7,277.46
235.25
2
May/05/2015
1:05 PM
Greece
646
1,778.98
2,559.06
3
Aug/22/2015
6:15 AM
Japan
80
5,502.90
1,577.03
4
Aug/07/2015
7:29 AM
Japan
345
9,951.92
817.99
5
Aug/13/2015
2:15 PM
US
32
624.93
2,309.21
6
Dec/19/2015
5:58 AM
Italy
592
8,201.98
181.49
7
Mar/05/2015
5:53 PM
UK
65
848.82
2,870.94
8
Jul/22/2015
9:19 AM
UK
593
5,409.69
444.11
9
Sep/10/2015
1:48 AM
Greece
39
6,371.48
3,509.84

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