Using the MVC Wrapper for Kendo Grid, How can I have the column header span 2 columns?
I have 4 columns and want a header on the 1st and 3rd column spaning col1 and col 2, and the one on col 3 spaning col 3 an 4.
when I do it with
.HeaderHtmlAttributes(new { Colspan = 2 })
it works, but there are always 4 headers, not only 2...
You can add a.HeaderHtmlAttributes(new { style= "display:none;" })
to the following column :
@(Html.Kendo().Grid(Model.List)
.Name("grid")
.Columns(c => {
c.Bound(e => e.ID);
c.Bound(e => e.Nom).HeaderHtmlAttributes(new { colspan = 2 });
c.Bound(e => e.Nb).HeaderHtmlAttributes(new { style= "display:none;" });
})
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With