| @using Syncfusion.EJ2 @model mvc_ej2.Controllers.HomeController.TestViewModel @using (Html.BeginForm()) { @Html.EJS().DatePickerFor(m => m.Date1).Render(); <hr /> @(Html.EJS().Grid("FlatGrid").DataSource((IEnumerable<object>)ViewBag.dataSource).Width("auto").Columns(col => { col.Field("EmployeeID").IsPrimaryKey(true).Width("150").ValidationRules(new { required = "true" }).Add(); col.Field("OrderDate").Format("yMd").EditType("datepickeredit").Width("150").Add(); }).AllowPaging().EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render() ) } |