I just downloaded the trial version, and I'm having problems creating a simple grid. I tries three different "variations" and none seem to work.
First, I tried this:
I don't get intellisense for c.Bound method, so something is wrong.
I then tried
But it thinks that the model is an html tag and not the model class.
I then tried
But this places the headers at the bottom of the grid.
It seems that there are many different ways to create grids, so what is the best way and why don't the above work?
Thanks
Alex
First, I tried this:
@(Html.Kendo().Grid(Model).Name(
"ConnectionManagementSystems"
).Columns(c => { c.
I then tried
@(Html.Kendo().Grid<ConnectionManagement.Models.ConnectionManagement2Model></ConnectionManagement.Models.ConnectionManagement2Model>
I then tried
<
script
>
$(document).ready(function () {
$("#connectionManagementSystems").kendoGrid();
});
</
script
>
<
div
id
=
"connectionManagementSystems"
>
<
table
>
<
tr
>
<
th
>
@Html.DisplayNameFor(model => model.SiteAddress)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SiteAddressCity)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SiteAddressState)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SiteAddressZipCode)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SiteId)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SiteName)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SystemId)
</
th
>
<
th
>
@Html.DisplayNameFor(model => model.SystemType)
</
th
>
<
th
></
th
>
</
tr
>
@foreach (var item in Model) {
<
tr
>
<
td
>
@Html.DisplayFor(modelItem => item.SiteAddress)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SiteAddressCity)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SiteAddressState)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SiteAddressZipCode)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SiteId)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SiteName)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SystemId)
</
td
>
<
td
>
@Html.DisplayFor(modelItem => item.SystemType)
</
td
>
<
td
>
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
</
td
>
</
tr
>
}
</
table
>
</
div
>
It seems that there are many different ways to create grids, so what is the best way and why don't the above work?
Thanks
Alex