I would like to hide the last column in my grid.
How can I do this?
Here's my code:
@(Html.Kendo().Grid<GoodNeighbor.Models.TrackingList>()
.Name("TrackingListGrid")
.Columns(c =>
{
c.Bound(t => t.TrackingListId).Hidden(true);
c.Bound(t => t.FirstName).Width(115).Title("First Name");
c.Bound(t => t.LastName).Width(115).Title("Last Name");
c.Bound(t => t.Email).Width(150);
c.Bound(t => t.Date).Width(90).ClientTemplate("#= kendo.toString(kendo.parseDate(CreatedDate), 'MM/dd/yyyy') #");
c.Bound(t => t.Hours).Width(85);
c.Bound(t => t.VolunteerOrganization).Width(120).Title("Volunteer Organization");
c.Bound(t => t.ReponseCopy).Width(115).Title("Reponse Copy");
c.Bound(t => t.Phone).Width(85);
c.Bound(t => t.Location).Width(85);
c.Bound(t => t.CreatedDate).Hidden(true);
c.Bound(t => t.ModifiedDate).Hidden(true);
c.Bound(p => p.TrackingListId).ClientTemplate("<a href='" + Url.Action("Create", "TrackingList") + "/#= TrackingListId #'" + ">Details</a>"); // Details link
})
.HtmlAttributes(new { style = "height: 400px;" })
.Scrollable()
.Groupable()
.Sortable()
.Filterable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(r => r.Action("TrackingListRead", "TrackingList").Data("sendAntiForgery"))
.Model(model => model.Id(p => p.TrackingListId))
.Events(events => events.Error("onError"))
)
)