ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexGrid

Overview

This sample demonstrates how to export and import a wijmo5 flexgrid to excel file.

Features

Id
Date
Time
Country
Downloads
Sales
Expenses
Checked
0
Oct/18/2015
4:35 AM
UK
599
915.08
2,588.22
1
Oct/17/2015
4:37 AM
UK
356
1,966.76
4,912.71
2
Sep/12/2015
5:21 PM
Germany
881
2,021.72
1,817.51
3
Sep/03/2015
9:44 PM
Germany
380
8,936.11
3,669.69
4
Jan/09/2015
8:01 AM
Germany
392
8,068.66
4,977.92
5
Nov/07/2015
12:23 AM
Germany
190
2,853.25
2,891.00
6
Dec/06/2015
1:27 AM
Greece
440
686.64
255.48
7
Aug/13/2015
8:27 PM
Greece
210
6,416.03
1,552.16
8
Nov/22/2015
8:06 PM
Japan
805
3,368.01
1,618.75
9
Oct/09/2015
1:02 AM
Italy
466
7,796.72
496.36
10
Jan/05/2015
5:38 PM
UK
427
8,846.90
727.73
11
Feb/06/2015
9:31 AM
Japan
311
5,569.26
3,735.06
12
Feb/09/2015
6:28 AM
Japan
348
4,079.41
2,665.28
13
Apr/10/2015
2:46 AM
Greece
615
9,081.22
4,795.06
14
Apr/24/2015
8:15 PM
Germany
279
3,575.80
4,955.04

Settings


Export & Import
Export Name :           

Description

This sample demonstrates how to export and import a 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
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 _flexGridModel = new GridExportImportOptions
        {
            NeedExport = true,
            NeedImport = true,
            IncludeColumnHeaders = true
        };
        public ActionResult Index()
        {
            ViewBag.Options = _flexGridModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@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);
</script>
@section Description{
    @Html.Raw(Resources.Wijmo5FlexGrid.Index_Text0)
}