This question is locked. New answers and comments are not allowed.
Wen click "Add new record" button in grid, there have two button ("Insert","cancel"),
How can i get "cancel" button event?
I want to write some bussiness rule!
How can i get "cancel" button event?
I want to write some bussiness rule!
<%= Html.Telerik().Grid<MvcPoExpense.Models.SmpPoLinesVMeta>() .Name("Grid") .DataKeys(keys => keys.Add(c => c.LineId)) .ToolBar(commands => commands.Insert().ButtonType(GridButtonType.Text) .ImageHtmlAttributes(new { style = "margin-left:0" })) .DataBinding(dataBinding => { dataBinding.Ajax() .Select("_SelectAjax", "MvcPoExpense", new { hdid = Model.HeaderId }) .Insert("_InsertAjax", "MvcPoExpense") .Update("_Updatejax", "MvcPoExpense", new { hdid = Model.HeaderId }) .Delete("_DeleteAjax", "MvcPoExpense", new { hdid = Model.HeaderId }); }) .Columns(columns => { columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Text); commands.Delete().ButtonType(GridButtonType.Text); }).Width(180).Title("Commands"); columns.Bound(o => o.LineNum).Format("{0:G}").Width(60).ReadOnly(); columns.Bound(o => o.LineTypeName).Width(110); columns.Bound(o => o.ItemCategoryName).Width(180); columns.Bound(o => o.ItemDesc).Width(140); columns.Bound(o => o.NeedByDate).Width(100).Format("{0:yyyy/MM/dd}"); columns.Bound(o => o.Amount).Width(100).Format("{0:C}"); columns.Bound(o => o.Requestor).Width(180); columns.Bound(o => o.ShipOrganizationCode).Width(100); columns.Bound(o => o.AccountSegment4Desc).Width(110); columns.Bound(o => o.TaxName).Width(110); }) .ClientEvents(events => events.OnEdit("onEdit")) .ClientEvents(events => events.OnSave("onSave")) .Pageable() .Editable(editing => editing.Mode(GridEditMode.InLine)) .Sortable() .Scrollable(scrolling => scrolling.Height(300)) %>