public
ActionResult Index()
{
var client =
new
UnitServiceClient();
var listOfUnitsFromService = client.GetListOfUnits(
true
);
var model =
new
UnitModel
{
UnitTypes = listOfUnitsFromService.ToList()
};
return
View(model);
}
<
div
class
=
"row-fluid"
>
<
div
class
=
"span12"
>
<
div
class
=
"k-block"
>
<
div
class
=
"k-header"
>Unit List</
div
>
@(Html.Kendo().Grid(Model.UnitTypes)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Id).Groupable(false);
columns.Bound(p => p.Name);
columns.Command(command => { command.Custom("Edit Unit"); }).Width(160);
})
.Groupable()
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
)
</
div
>
</
div
>
01.
@(Html.Kendo().Grid(Model)
02.
.Name(
"Grid"
)
03.
.HtmlAttributes(
new
{ style =
"width:80%"
})
04.
.Columns(columns =>
05.
{
06.
columns.Bound(p => p.CountyID);
07.
columns.Bound(p => p.County);
08.
columns.Bound(p => p.OrderNum);
09.
columns.Bound(p => p.ShippedDate).Format(
"{0:MM/dd/yyyy}"
);
10.
columns.Bound(p => p.InvCode);
11.
columns.Bound(p => p.TagName);
12.
columns.Bound(p => p.Quantity)
13.
.ClientGroupFooterTemplate(
"Total: #=sum#"
);
14.
})
15.
.Groupable()
16.
.Pageable()
17.
.Sortable()
18.
.Filterable()
19.
.DataSource(dataSource => dataSource
20.
.Ajax()
21.
.Group(g => g.Add(p => p.CountyID))
22.
.Group(g => g.Add(p => p.County))
23.
.Group(g => g.Add(p => p.OrderNum))
24.
.Group(g => g.Add(p => p.ShippedDate))
25.
.Aggregates(aggregates =>
26.
{
27.
aggregates.Add(p => p.Quantity).Sum();
28.
})
29.
.Read(read => read.Action(
"CountyMonth_Read"
,
"Report"
).Data(
"CountyMonthData"
))
30.
.PageSize(10)
31.
32.
)
33.
34.
)
Hello all Kendo experts. I'm facing an issue here with MVC Grid batch update. Your help will be appreciated here. So here is my scenario.
Please bear in mind, it's the same column, but rows are editable or not (given the condition). I've alredy acheived at this point.
(See screenshot attached).
What I'm looking for is.
On Save Changes event, calculate the values of the other rows.
The problem I'm facing is, since on the natch update, these rows were not "Edited" by the user, these values are not refreshes at the controller.
So, basically what I'm looking for, is for the same type of column, make some rows non-editable, but refresh with calculated values on the Save changes.
In the screeshot supplied, the rows in blue are my calculated rows.
Any help please?