Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.data).AllowPaging(true).Load("load").Columns(col =>
{
col.Field("OrderID").HeaderText("OrderID").IsPrimaryKey(true).Width("120").Add();
col.Field("CustomerID").HeaderText("CustomerID").Width("120").Add();
col.Field("EmployeeID").HeaderText("EmployeeID").Width("120").Add();
col.Field("ShipCity").HeaderText("ShipCity").Width("120").Add();
}).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()
<script type="text/javascript">
function load(args) {
this.columns[1].validationRules = { required: true, minLength: [customFn, 'Need atleast 5 letters'] };
}
function customFn(args) {
return args['value'].length >= 5;
}
</script> |