FlexGrid
FlexGrid
Remote Data Bind
This example shows how you can bind FlexGrid with the data from some Action.
Features
Start
End
Country
Product
Color
Amount
Amount2
Discount
Active
Start
End
Country
Product
Color
Amount
Amount2
Discount
Active
0
loading...
Description
This example shows how you can bind FlexGrid with the data from some Action.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | using C1.Web.Mvc; using Microsoft.AspNetCore.Mvc; using C1.Web.Mvc.Serialization; using MvcExplorer.Models; namespace MvcExplorer.Controllers { public partial class FlexGridController : Controller { public ActionResult RemoteBind_Read([C1JsonRequest] CollectionViewRequest<Sale> requestData) { return this .C1Json(CollectionViewHelper.Read(requestData, Sale.GetData(500))); } public ActionResult RemoteBind() { return View(); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | < c1-flex-grid auto-generate-columns = "false" sorting-type = "SingleColumn" is-read-only = "true" class = "grid" selection-mode = "Row" > < c1-items-source read-action-url = "@Url.Action(" RemoteBind_Read ")" ></ c1-items-source > < c1-flex-grid-column binding = "ID" is-visible = "false" ></ 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-flex-grid > @section Description{ @Html .Raw(FlexGridRes.RemoteBind_Text0) } |