Hi, I am initializing a kendo grid from a table that already has a header, and tbody with rows and columns,
I am not sure how to add grouping/aggregates to this table, or can this only be done when using a datastouce??
I want to add a grouping on the DATE column, with an aggregate sum on the CHARGE column,
can you please help
I am not sure how to add grouping/aggregates to this table, or can this only be done when using a datastouce??
I want to add a grouping on the DATE column, with an aggregate sum on the CHARGE column,
can you please help
$(document).ready(
function
() {
$(
"#Journeys"
).kendoGrid({
scrollable:
false
,
pageable:
true
,
sortable: {
mode:
"single"
,
allowUnsort:
false
},
filterable:
true
});
});
<
table
id
=
"Journeys"
>
<
colgroup
>
<
col
style
=
"width: 28px;"
/>
<
col
style
=
"width: 180px;"
/>
<
col
style
=
"width: 210px;"
/>
<
col
style
=
"width: 150px;"
/>
<
col
style
=
"width: 130px;"
/>
</
colgroup
>
<
thead
>
<
tr
>
<
th
data-field
=
"rank"
></
th
>
<
th
data-field
=
"Date"
>Date/Time</
th
>
<
th
data-field
=
"Journey"
>Journey/Action</
th
>
<
th
data-field
=
"Charge"
>Charge</
th
>
<
th
data-field
=
"Action"
></
th
>
</
tr
>
</
thead
>
<
tbody
>
@foreach (var model in Model)
{
<
tr
>
<
td
></
td
>
<
td
>@Html.Encode(model.Date)</
td
>
<
td
>@Html.Encode(model.JourneyDescription)</
td
>
<
td
>@Html.Raw(model.FormattedCharge)</
td
>
<
td
></
td
>
</
tr
>
}
</
tbody
>
</
table
>