Will the Grid have an update to group within the code like what we can do in Asp.Net Core?
I have also noticed that we cannot hide columns, just not rendered. I have hidden columns here to change the Grouping headers.
Example: (The grouping starts with line 19, which works in Asp.NET core)
01.
@(Html.Kendo().Grid<
Scenario
>(Model.Scenarios)
02.
.Name("scenarios")
03.
.Columns(col =>
04.
{
05.
col.Bound(c => c.Task.CodeYear).ClientGroupHeaderTemplate("Survey: #= data.value#").Hidden(true);
06.
col.Bound(c => c.Task.Site.Alias).ClientGroupHeaderTemplate("Site: #= data.value#").Hidden(true);
07.
col.Bound(c => c.ReferenceCode).ClientGroupHeaderTemplate("Scenario No: #= data.value#").Hidden(true);
08.
09.
col.Bound(c => c.Level).ClientTemplate("<
a
href
=
'" + Url.Content($"/Foundation/Scenarios/Details?id=") + "#= ScenarioId#'
><
div
data-toggle=\"popover\" title=\"#=Level.TypeName# \" data-content=\"#=Level.Description#\">#=Level.ShortName#<
span
class=\"glyphicon glyphicon-info-sign\"></
span
></
div
>").Width(100);
10.
11.
col.Bound(c => c.Risk).Width(150);
12.
13.
col.Bound(c => c.BusinessInterruption).Title("BI").ClientTemplate("#=BusinessInterruption# <
a
href=\"\\#\" data-toggle=\"popover\" title=\"#=BusinessInterruption#\" data-content=\"#=BIComments#\"><
span
class=\"glyphicon glyphicon-info-sign\"></
span
></
a
>");
14.
col.Bound(c => c.Workaround).Title("Workaround").ClientTemplate("#=Workaround# <
a
href=\"\\#\" data-toggle=\"popover\" title=\"#=Workaround#\" data-content=\"#=WorkaroundComments#\"><
span
class=\"glyphicon glyphicon-info-sign\"></
span
></
a
>");
15.
col.Bound(c => c.MaterialDamage).Title("Material Damage").ClientTemplate("#=MaterialDamage# <
a
href=\"\\#\" data-toggle=\"popover\" title=\"#=MaterialDamage#\" data-content=\"#=MaterialDamageComments#\"><
span
class=\"glyphicon glyphicon-info-sign\"></
span
></
a
>");
16.
})
17.
.DataSource(ds =>
18.
ds.Ajax()
19.
.Group(group =>
20.
{
21.
group.Add(g => g.Task.CodeYear);
22.
group.Add(g => g.Task.Site.Alias);
23.
group.Add(g => g.ReferenceCode);
24.
})
25.
)
26.
.Scrollable()
27.
)