Hi!
I just do my first steps with KendoUI and came across a problem I see no sultion for:
I bind a dataSource to a grid. The dataSource is grouped by a field which is not used in the grid:
Everything's OK so far, but now I want to define a groupHeaderTemplate für the 'Continent'-Field; the way it is displayed now in the GroupHeader, which is something like [Fieldname]: [Fieldvalue]. Right now, only displaying [Fieldvalue] would be good enough, but the best solution would offer a complete template.
Can this be done (easily)?
Another thing quite similiar: When the (nondisplayed) grouping field is boolean ('true' and 'false' ist displayed): Is the a way to display alternate values like
Thanks in advance
I just do my first steps with KendoUI and came across a problem I see no sultion for:
I bind a dataSource to a grid. The dataSource is grouped by a field which is not used in the grid:
var dsCountries = new kendo.data.DataSource({
type: "json",
transport: {
read: {
url: '@Url.Action("GetCountries", "Home")',
dataType: "json",
type: "POST"
}},
schema: {
data: "data",
total: "total",
model: {
id: 'CountryID',
fields: {
Country: { type: "string" },
Currency: { type: "string" },
Size: { type: "double" },
Continent: { type: "string" }
}}},
group: {
field: "Continent", aggregates: [
{ field: "Size", aggregate: "sum" }
]
},
aggregate: [ { field: "Size", aggregate: "sum" } ],
sort: { field: "Country", dir: "asc" },
pageSize: 100,
serverPaging: true,
serverFiltering: true,
serverSorting: true
});
var detailGrid = $("<
div
id=\"grid\" />").kendoGrid({
dataSource: dsCountries,
groupable: false,
sortable: false,
pageable: false,
scrollable: false,
columns: [
{ field: "Country", width: 200, title: "Text" },
{ field: "Currency", width: 200, title: "Text" },
{
field: "Size", width: 70, title: "Size", format: "{0:n}", attributes: { "Class": "numbers" },
groupFooterTemplate: "<
div
class=\"numbers\">#=kendo.toString(sum, 'n') #</
div
>",
footerTemplate: "<
div
class=\"numbers\">#=kendo.toString(sum, 'n') #</
div
>"
}
]
});
Can this be done (easily)?
Another thing quite similiar: When the (nondisplayed) grouping field is boolean ('true' and 'false' ist displayed): Is the a way to display alternate values like
groupingboolean ? "Yes" : "No";