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
Sep/16/2015
12:48 AM
Italy
696
9,751.03
4,492.33
1
Oct/14/2015
11:26 PM
Japan
64
7,466.87
4,964.98
2
Jun/24/2015
12:08 AM
Italy
972
2,298.71
4,687.79
3
Jan/18/2015
1:14 PM
Greece
46
9,211.68
817.94
4
Aug/24/2015
6:11 AM
Japan
284
7,004.80
622.97
5
Oct/08/2015
1:03 PM
Greece
988
1,980.97
1,849.49
6
Nov/12/2015
5:55 PM
Greece
839
7,231.30
2,337.97
7
Apr/08/2015
2:55 PM
UK
917
6,128.36
4,965.12
8
Nov/23/2015
8:41 PM
Italy
938
7,092.17
2,240.85
9
Oct/07/2015
9:37 PM
US
584
8,624.42
1,660.47

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