Hello,
I apologize for the hash of a question this is. I am looking for a way to save the development team some time in a site heavy with kendo grid use. For example we have a grid defined like this:
01.
@(Html.Kendo().Grid(Model)
02.
.Name(
"grid"
)
03.
.Columns(columns =>
04.
{
05.
columns.Bound(e => e.StyleName).Filterable(ftb => ftb.Multi(
true
));
06.
columns.Bound(e => e.Collection).Filterable(ftb => ftb.Multi(
true
));
07.
columns.Bound(e => e.CommodityDesign).Filterable(ftb => ftb.Multi(
true
));
08.
columns.Bound(e => e.Decoration).Filterable(ftb => ftb.Multi(
true
));
09.
columns.Bound(e => e.StyleId).Filterable(ftb => ftb.Multi(
true
));
10.
})
11.
.HtmlAttributes(
new
{ style =
"width: 80%;"
})
12.
.DataSource(data => data.Ajax().Model(mdl => mdl.Id(p => p.StyleId) ))
13.
.Scrollable()
14.
.Groupable()
15.
.Sortable()
16.
.Editable()
17.
.Filterable()
18.
.Selectable()
19.
.Pageable(pageable => pageable
20.
.Refresh(
true
)
21.
.PageSizes(
true
)
22.
.ButtonCount(5))
23.
)
The client has accepted this layout and now states they want every grid this way. We certainly could go through and manually crud every grid to match this pattern. I was just trying to think of a way we could use the above as a "template" leaving us just the relevant deltas to configure. For example this pseudo code below:
1.
@(Html.CustomKendoGrid(Model)
2.
.DataSource(data => data.Ajax().Model(mdl => mdl.Id(p => p.NewProdId))))
TIA
JB