Hi,
Last week, we have performed Kendo UI upgrade but after that we encountered some errors but manage to made some code adjustments.
Now my main concern is that before the update the below grid is working as you see on the image below (or screenshot 0002.png)
![]()
I am doing some test on my existing codes as shown below but it is really weird that after the update I am getting the above error.
This is the code said code.
When I tried to partially try to figure out the issue this line is cause the problem as it seemed that the code cannot find the said templateId.
But when I commented the above code it shows the grid (see attached Screenshots 0001.png).
![]()
As far as our Foundation Server is concern we didn't see any changes on the said file but now we encountered this after the update.
I hope you can advise us on this as we will be doing system release pretty soon.
Thanks,
Rhan Tepe Takamiya
on Behalf of Steve
Last week, we have performed Kendo UI upgrade but after that we encountered some errors but manage to made some code adjustments.
Now my main concern is that before the update the below grid is working as you see on the image below (or screenshot 0002.png)
I am doing some test on my existing codes as shown below but it is really weird that after the update I am getting the above error.
This is the code said code.
@{
ViewBag.Controller = "POs";
ViewBag.TemplateController = "POLines";
ViewBag.Area = "KOKO";
}
@(Html.Kendo().Grid<
PO
>()
.Name("PurchaseOrderList")
.HtmlAttributes(new { @class = "grid nowrap" })
.ToolBar(commands =>
{
commands.Create()
.Text(Html.ButtonsResource("AddPurchaseOrder"))
.HtmlAttributes(new { @class = "t-add" });
})
.Columns(columns =>
{
columns
.Bound(x => x.OriginPortId)
.Hidden();
columns
.Bound(x => x.PONumber)
.Title(Html.PropertiesResource("PO.PONumber"));
columns
.Bound(x => x.OriginPortName)
.EditorViewData(new { Action = "GetFilteredPortByVendorOrFactory", Controller = "DataSource", onData = "onInlinePortOfOrigin", onSelect = "onInlinePortSelectById" })
.EditorTemplateName("InlineAutoComplete")
.Title(Html.PropertiesResource("PO.OriginPortId"));
columns
.Bound(x => x.TotalPOQuantity)
.Title(Html.PropertiesResource("PO.TotalPOQuantity"));
columns
.Bound(x => x.TotalASNQuantity)
.Title(Html.PropertiesResource("PO.TotalASNQuantity"));
columns
.Bound(x => x.TotalGRNQuantity)
.Title(Html.PropertiesResource("PO.TotalGRNQuantity"));
columns
.Bound(x => x.Variance)
.Title(Html.PropertiesResource("PO.Variance"));
columns.Command(commands =>
{
commands
.Edit()
.HtmlAttributes((new { title = Html.ButtonsResource("Edit") }));
commands
.Destroy()
.HtmlAttributes((new { title = Html.ButtonsResource("Delete") }));
}
)
.Width("5%")
.HtmlAttributes(new { @class = "nowrap" })
.Title(Html.StringsResource("Commands"));
})
.PrefixUrlParameters(false)
.ClientDetailTemplateId("asnPurchaseOrderLineTemplate")
.EnableCustomBinding(true)
.Sortable(x => x.SortMode(GridSortMode.SingleColumn))
.Filterable()
.Events(events => events
.Save("SaveASNPurchaseOrder")
.DataBound("KendoGrid.DataBound")
.Edit("KendoGrid.Edit"))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model
.Id(x => x.Id);
model
.Field(x => x.TotalPOQuantity)
.Editable(false);
model
.Field(x => x.TotalASNQuantity)
.Editable(false);
model
.Field(x => x.TotalGRNQuantity)
.Editable(false);
model
.Field(x => x.Variance)
.Editable(false);
})
.Events(e => e
.Error("KendoGrid.Error")
.RequestEnd("KendoGrid.RequestEnd"))
.Create(create => create.Action("Add", (String)ViewBag.Controller, new { area = (String)(ViewBag.Area ?? String.Empty) }))
.Read(read => read.Action("Index", (String)ViewBag.Controller, new { area = (String)(ViewBag.Area ?? String.Empty), ASNId = Request[Constants.ASNId] }))
.Update(create => create.Action("Update", (String)ViewBag.Controller, new { area = (String)(ViewBag.Area ?? String.Empty) }))
.Destroy(create => create.Action("Remove", (String)ViewBag.Controller, new { area = (String)(ViewBag.Area ?? String.Empty) }))
.PageSize(((DataSourceRequest)ViewData[Constants.Request]).PageSize)
)
.Pageable(pager => pager
.Input(true)
.Refresh(true)
)
)
<
script
>
function SaveASNPurchaseOrder(e) {
e.model.UrlMask = GetUrlMask();
e.model.ASNId = '@ViewContext.RouteData.Values[Constants.ASNId]';
}
</
script
>
<
script
id
=
"asnPurchaseOrderLineTemplate"
type
=
"text/kendo-tmpl"
>
@(Html.Kendo().Grid<
POLines
>()
.Name("productLines_#=Id#")
.HtmlAttributes(new { @class = "grid nowrap" })
.ToolBar(commands =>
{
commands.Create()
.Text(Html.ButtonsResource("AddItem"))
.HtmlAttributes(new { @class = "t-add" });
})
.Columns(columns =>
{
columns
.Bound(x => x.ProductMasterGTINId)
.Hidden();
columns
.Bound(x => x.Code)
.EditorViewData(new { Action = "GetCompleteProduct", Controller = "DataSource", onSelect = "onProductDetailSelectById", onData = "onProductDataById" })
.EditorTemplateName("InlineAutoCompleteProductAndGTIN")
.Width(300);
columns
.Bound(x => x.Description)
.EditorTemplateName("InlineString")
.EditorViewData(new { disabled = "disabled" })
.Title(Html.PropertiesResource("POLines.Description"));
columns
.Bound(x => x.HTSCode)
.EditorTemplateName("InlineString")
.EditorViewData(new { disabled = "disabled" })
.Title(Html.PropertiesResource("POLines.HTSCode"));
columns
.Bound(x => x.GTIN)
.EditorTemplateName("InlineString")
.EditorViewData(new { disabled = "disabled" })
.Title(Html.PropertiesResource("POLines.GTIN"));
columns
.Bound(x => x.SKU)
.EditorTemplateName("InlineString")
.EditorViewData(new { disabled = "disabled" })
.Title(Html.PropertiesResource("POLines.SKU"));
columns
.Bound(x => x.Attributes)
.EditorTemplateName("InlineString")
.EditorViewData(new { disabled = "disabled" })
.ClientTemplate("\\#= Attributes \\#")
.Title(Html.PropertiesResource("ProductMasterGTINViewModel.AttributeString"));
columns
.Bound(x => x.POQuantity)
.Title(Html.PropertiesResource("POLines.POQuantity"));
columns
.Bound(x => x.ASNQuantity)
.Title(Html.PropertiesResource("POLines.ASNQuantity"));
columns
.Bound(x => x.GRNQuantity)
.Title(Html.PropertiesResource("POLines.GRNQuantity"));
columns
.Bound(x => x.Variance)
.Title(Html.PropertiesResource("POLines.Variance"));
columns.Command(commands =>
{
commands
.Edit()
.HtmlAttributes((new { title = Html.ButtonsResource("Edit") }));
commands
.Destroy()
.HtmlAttributes((new { title = Html.ButtonsResource("Delete") }));
}
)
.Width("5%")
.HtmlAttributes(new { @class = "nowrap" })
.Title(Html.StringsResource("Commands"));
})
.PrefixUrlParameters(false)
.Events(events => events
.Save("SavePurchaseOrderProductLine")
.DataBound("KendoGrid.DataBound")
.Edit("KendoGrid.Edit"))
.Sortable(x => x.SortMode(GridSortMode.SingleColumn))
.Editable(x => x.Mode(GridEditMode.InLine))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(x => x.Id);
model.Field(x => x.GRNQuantity).Editable(false);
model.Field(x => x.Variance).Editable(false);
})
.Events(e => e
.Error("KendoGrid.Error")
.RequestEnd("KendoGrid.RequestEnd"))
.Create(create => create.Action("Add", (String)ViewBag.TemplateController, new { area = (String)(ViewBag.Area ?? String.Empty), PurchaseOrderId = "#=Id#" }))
.Read(read => read.Action("Index", (String)ViewBag.TemplateController, new { area = (String)(ViewBag.Area ?? String.Empty), PurchaseOrderId = "#=Id#" }))
.Update(create => create.Action("Update", (String)ViewBag.TemplateController, new { area = (String)(ViewBag.Area ?? String.Empty) }))
.Destroy(create => create.Action("Remove", (String)ViewBag.TemplateController, new { area = (String)(ViewBag.Area ?? String.Empty) }))
.PageSize(((DataSourceRequest)ViewData[Constants.Request]).PageSize)
)
.Pageable(pager => pager
.Input(true)
.Refresh(true)
)
.ToClientTemplate()
)
</
script
>
<
script
>
function SavePurchaseOrderProductLine(e) {
e.model.UrlMask = GetUrlMask();
}
</
script
>
When I tried to partially try to figure out the issue this line is cause the problem as it seemed that the code cannot find the said templateId.
.ClientDetailTemplateId("asnPurchaseOrderLineTemplate")
But when I commented the above code it shows the grid (see attached Screenshots 0001.png).
As far as our Foundation Server is concern we didn't see any changes on the said file but now we encountered this after the update.
I hope you can advise us on this as we will be doing system release pretty soon.
Thanks,
Rhan Tepe Takamiya
on Behalf of Steve