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
Aug/19/2015
7:41 PM
US
745
4,731.75
3,730.18
1
Aug/06/2015
4:10 AM
Japan
595
6,745.80
1,828.86
2
May/04/2015
5:42 AM
Italy
387
9,200.91
1,683.46
3
Nov/05/2015
2:39 PM
Italy
406
5,925.48
2,626.74
4
Jun/12/2015
8:37 AM
Greece
764
5,213.77
359.25
5
Mar/01/2015
12:43 PM
Italy
750
3,072.60
1,090.59
6
Sep/24/2015
7:48 PM
Germany
15
4,465.76
918.82
7
Oct/18/2015
7:45 PM
Japan
343
7,594.32
2,624.40
8
May/20/2015
9:49 PM
Germany
25
6,929.84
4,294.09
9
Apr/23/2015
11:11 PM
UK
605
2,288.51
2,781.50

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
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebApiExplorer.Models;
 
namespace WebApiExplorer.Controllers
{
    public partial class Wijmo5FlexGridController : Controller
    {
        private readonly GridExportImportOptions _flexGridPagingModel = new GridExportImportOptions
        {
            NeedExport = true,
            NeedImport = false,
            IncludeColumnHeaders = true,
            OnlyCurrentPage = false
        };
 
        public ActionResult 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
@using WebApiExplorer.Models
@{
    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>
@(Html.C1().Pager().Owner(optionsModel.ControlId))
@section Description{
    @Html.Raw(Resources.Wijmo5FlexGrid.Paging_Text0)
}