Hi All,
I admit that I am new to all of this. I have a Grid in an cshtml file. I am trying to pattern off the Northwind example. I have the following code within a <div> section:
@(Html.Kendo().Grid<CompanyViewModel>
()
.Name("companies")
.HtmlAttributes(new { style="height: 100%; border: 0;"})
.Scrollable()
.Columns(columns =>
{
columns.Template(t => { })
.ClientTemplate("#=CompanyId#")
.Title("Company ID")
.Width(120);
}
)
.Editable(e => e.Mode(GridEditMode.PopUp))
.Pageable(pageable => pageable.Refresh(true))
.Sortable()
.Selectable()
.Navigatable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(m =>
{
m.Id(f => f.CompanyId);
m.Field(f => f.CompanyId).Editable(false);
}
)
)
)
The trouble I am having is that I have red lines in the editing on everything from the first dataSource all the way to the end. When I hover over the start of the error I get the pop up description: C#: Unknown method 'DataSource(?)' of 'Kendo.Mvc.UI.Fluent.....
Attached is a screen shot.
I'm lost... any/all help would be great because I'm stuck
Thanks,
Steve
I admit that I am new to all of this. I have a Grid in an cshtml file. I am trying to pattern off the Northwind example. I have the following code within a <div> section:
@(Html.Kendo().Grid<CompanyViewModel>
()
.Name("companies")
.HtmlAttributes(new { style="height: 100%; border: 0;"})
.Scrollable()
.Columns(columns =>
{
columns.Template(t => { })
.ClientTemplate("#=CompanyId#")
.Title("Company ID")
.Width(120);
}
)
.Editable(e => e.Mode(GridEditMode.PopUp))
.Pageable(pageable => pageable.Refresh(true))
.Sortable()
.Selectable()
.Navigatable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(m =>
{
m.Id(f => f.CompanyId);
m.Field(f => f.CompanyId).Editable(false);
}
)
)
)
The trouble I am having is that I have red lines in the editing on everything from the first dataSource all the way to the end. When I hover over the start of the error I get the pop up description: C#: Unknown method 'DataSource(?)' of 'Kendo.Mvc.UI.Fluent.....
Attached is a screen shot.
I'm lost... any/all help would be great because I'm stuck
Thanks,
Steve