HenrySseki
Sep 03, 2020, 5:26 PM
I am new to Ext.Net. I setup everything as the guide but I created a view, added a sample MVC code sample and I get an error of
'The type or namespace 'ModelField' could not be found(are you missing a using directive or an assembly reference?)'.
@using Ext.Net.HtmlHelpers
@using Ext.Net.Core
@section headtag{
}
@section home
{
<h1>Simple Array Grid</h1>
@(Html.X().GridPanel()
.Title("Cell commands")
.Width(700)
.Height(300)
.Store(Html.X().Store()
.Model(Html.X().Model()
.Fields(
new ModelField("company"),
new ModelField("price", ModelFieldType.Float),
new ModelField("change", ModelFieldType.Float),
new ModelField("pctChange", ModelFieldType.Float)
)
)
.DataSource(Model)
)
.ColumnModel(
Html.X().Column().Text("Company").DataIndex("company").Flex(1),
Html.X().Column().Text("Price").DataIndex("price"),
Html.X().Column().Text("Change").DataIndex("change").Renderer("change"),
Html.X().Column().Text("Change").DataIndex("pctChange").Renderer("pctChange"),
Html.X().DateColumn().Text("Last Updated").DataIndex("lastChange")
)
)
}
'The type or namespace 'ModelField' could not be found(are you missing a using directive or an assembly reference?)'.
@using Ext.Net.HtmlHelpers
@using Ext.Net.Core
@section headtag{
}
@section home
{
<h1>Simple Array Grid</h1>
@(Html.X().GridPanel()
.Title("Cell commands")
.Width(700)
.Height(300)
.Store(Html.X().Store()
.Model(Html.X().Model()
.Fields(
new ModelField("company"),
new ModelField("price", ModelFieldType.Float),
new ModelField("change", ModelFieldType.Float),
new ModelField("pctChange", ModelFieldType.Float)
)
)
.DataSource(Model)
)
.ColumnModel(
Html.X().Column().Text("Company").DataIndex("company").Flex(1),
Html.X().Column().Text("Price").DataIndex("price"),
Html.X().Column().Text("Change").DataIndex("change").Renderer("change"),
Html.X().Column().Text("Change").DataIndex("pctChange").Renderer("pctChange"),
Html.X().DateColumn().Text("Last Updated").DataIndex("lastChange")
)
)
}