This question is locked. New answers and comments are not allowed.
Hi,
I have a simple grid with Quantity, Unit Price and Total columns and a few others. The grid is set as GridEditMode.InLine. When I click on the Edit button of a row I can change the Quantity value. Once changed, when I click on the Update button I'd like the Total column to reflect the changes: Total = Qty * UPrice.
Here's the grid:
I tried to update the ModelState but the display doesn't change.
Thanks for your help.
I have a simple grid with Quantity, Unit Price and Total columns and a few others. The grid is set as GridEditMode.InLine. When I click on the Edit button of a row I can change the Quantity value. Once changed, when I click on the Update button I'd like the Total column to reflect the changes: Total = Qty * UPrice.
Here's the grid:
@(Html.Kendo().Grid(Model.Products) .Name("FabricGrid") .Columns(columns => { columns.Bound(p => p.Fabric); columns.Bound(p => p.Pattern); columns.Bound(p => p.Description); columns.Bound(p => p.UPrice); columns.Bound(p => p.Qty).Width(150); columns.Bound(p => p.Total); columns.Command(command => command.Edit()).Width(110); columns.Command(command => command.Destroy()).Width(110); }) .Scrollable() .Sortable() .Editable(editable => editable.Mode(GridEditMode.InLine)) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .Model(model => model.Id(p => p.ProductId))
.Events(events => events.Error("error_handler")) .Update(update => update.Action("Product_Update", "ShoppingCart")) .Destroy(destroy => destroy.Action("Product_Delete", "ShoppingCart")) )) I tried to update the ModelState but the display doesn't change.
Thanks for your help.