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
Nov/06/2015
11:29 AM
US
228
6,922.42
4,390.25
1
Oct/23/2015
12:45 PM
Greece
849
1,572.76
29.17
2
Aug/21/2015
4:47 AM
Japan
900
4,096.44
4,502.85
3
Sep/04/2015
6:04 PM
US
535
8,883.16
3,025.28
4
Aug/12/2015
5:43 PM
US
883
9,444.25
1,409.70
5
Mar/21/2015
4:04 AM
US
920
5,735.04
2,375.52
6
Oct/13/2015
10:10 PM
Japan
213
3,368.30
4,304.04
7
Feb/11/2015
5:52 PM
Germany
385
8,325.78
926.78
8
Mar/09/2015
1:04 AM
Germany
53
8,076.08
3,827.25
9
Oct/01/2015
9:17 PM
Greece
704
5,840.65
1,960.67

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