FlexGrid
FlexGrid
Frozen Cells
This view shows the FlexGrid control's frozen cells features.
Features
ID
Start
End
Country
Product
Color
Amount
Amount2
Discount
Active
1
Jan 25 25
00:00
German
Gadget
Green
$581.61
$1,030.17
14%
true
2
Feb 25 25
01:30
Italy
Gadget
Green
($4,673.75)
$3,499.71
13%
false
ID
Start
End
Country
Product
Color
Amount
Amount2
Discount
Active
0
loading...
Settings
Frozen Columns: 1
Frozen Rows: 2
Description
This view shows the FlexGrid control's frozen cells features.
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 27 28 29 30 31 32 33 34 35 36 37 | using C1.Web.Mvc; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using MvcExplorer.Models; using C1.Web.Mvc.Serialization; namespace MvcExplorer.Controllers { public partial class FlexGridController : Controller { public ActionResult FrozenCells() { ViewBag.DemoSettings = true ; ViewBag.DemoSettingsModel = new ClientSettingsModel { Settings = CreateSettings() }; return View(); } public ActionResult FrozenCells_Bind([C1JsonRequest] CollectionViewRequest<Sale> requestData) { return this .C1Json(CollectionViewHelper.Read(requestData, Sale.GetData(500))); } private static IDictionary< string , object []> CreateSettings() { var settings = new Dictionary< string , object []> { { "FrozenColumns" , new object []{1, 0, 2, 3}}, { "FrozenRows" , new object []{2, 0, 1, 3, 4, 5}} }; return settings; } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | @model IEnumerable< Sale > @ { ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } < c1-flex-grid id = "@demoSettingsModel.ControlId" auto-generate-columns = "false" is-read-only = "true" class = "grid" frozen-columns = "1" frozen-rows = "2" > < c1-flex-grid-column binding = "ID" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Start" format = "MMM d yy" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "End" format = "HH:mm" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Country" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Product" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Color" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Amount" format = "c" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Amount2" format = "c" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Discount" format = "p0" ></ c1-flex-grid-column > < c1-flex-grid-column binding = "Active" ></ c1-flex-grid-column > < c1-items-source read-action-url = "@Url.Action(" FrozenCells_Bind ")" ></ c1-items-source > </ c1-flex-grid > @section Description{ @Html .Raw(FlexGridRes.FrozenCells_Text0) } |