Hi Telerik Team,
Currently I setup my mvc pivot grid as follow:
@(Html.Kendo().PivotConfigurator()
.Name("configurator")
.HtmlAttributes(new { @class = "hidden-on-narrow" })
.Filterable(true)
.Sortable()
.Height(580)
)
@(Html.Kendo().PivotGrid<EmployeeTurnOverDto>
()
.Name("pivotgrid")
.HtmlAttributes(new { @class = "hidden-on-narrow" })
.Filterable(true)
.Sortable()
.Configurator("#configurator")
.ColumnWidth(120)
.Height(580)
.BindTo(Model)
.DataSource(dataSource => dataSource
.Ajax()
.Schema(schema => schema
.Cube(cube => cube
.Dimensions(dimensions =>
{
dimensions.Add(model => model.FullName).Caption(L("Staffs"));
dimensions.Add(model => model.Institution).Caption(L("Institution"));
dimensions.Add(model => model.Department).Caption(L("Department"));
dimensions.Add(model => model.TurnOverDate).Caption(L("TurnOverDate"));
})
.Measures(measures =>
{
measures.Add("In").Field(model => model.JoinFlag).AggregateName("sum").Caption(L("In"));
measures.Add("Out").Field(model => model.ResignFlag).AggregateName("sum").Caption(L("Out"));
})
)
)
.Columns(columns =>
{
columns.Add("TurnOverDate").Expand(true);
})
.Rows(rows => rows.Add("Denomination").Expand(true))
.Measures(measures => measures.Values("In"))
.Events(e => e.Error("onError"))
)
)
Could you advise how to add the Year and/or Month (in MMM format) component of the TurnOverDate in the Column fields?
Note that I am not using cube, but using a flat data.
Thank you.
Regards,
Hage