This question is locked. New answers and comments are not allowed.
Hi! I have this grid_
And following action in controller named Ledger:
But the Action does not run when I hit the save button in the grid... Any suggestions? Something I'm missing?
kind regards
Francesca Backmalm
@(Html.Telerik().Grid(Model.SearchLedgerResults) .Name("LedgerGrid") .DataKeys(Keys => { Keys.Add(c => c.InvoiceNr); }) .DataBinding(dataBinding => { dataBinding.Server() .Update("UpdateInvoice", "Ledger"); }) .Columns(columns => { columns.Bound(inv => inv.InvoiceNr).Width(100); columns.Bound(inv => inv.Amount).Width(200); columns.Bound(inv => inv.AmountIn).Width(200); columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Image); }).Width(180).Title("Commands"); }) .Editable(editing => editing.Mode(GridEditMode.InLine)) .Pageable(paging => paging.PageSize(20)) .Scrollable(scrolling => scrolling.Height(580)) .Sortable())And following action in controller named Ledger:
[AcceptVerbs(HttpVerbs.Post)]public ActionResult UpdateInvoice(int invoiceNr){ var model = new LedgerModel(); model.InvoiceDetail = new bcInvoiceDetail() { InvoiceNr = invoiceNr }; if (TryUpdateModel(model.InvoiceDetail)) { var d = new bcLedgerFunctions().UpdateInvoice_Payed(model.InvoiceDetail, "PG", 7, CurrentUserId, CurrentBoatClubId); } return IndexModel(model);}But the Action does not run when I hit the save button in the grid... Any suggestions? Something I'm missing?
kind regards
Francesca Backmalm