Hi
We are using
version 12.4.0.30 of MVC Grid and we have a MVC like the example:
@(Html.EJ().Grid<T_HCP_HCO_CONFIG>("GrdMaster")
.Datasource((IEnumerable<object>)ViewBag.GridDS)
.EditSettings(edit =>
{
edit.AllowAdding().AllowDeleting().AllowEditing();
})
.ToolbarSettings(toolbar =>
{
toolbar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.Add);
items.AddTool(ToolBarItems.Edit);
items.AddTool(ToolBarItems.Delete);
items.AddTool(ToolBarItems.Update);
items.AddTool(ToolBarItems.Cancel);
});
})
.AllowPaging(true).PageSettings(page => page.PageSize(15))
.AllowFiltering(true).FilterSettings(filter => {
filter.FilterType(FilterType.Menu); })
.AllowSorting(true)
.Columns(col =>
{
col.Field("ID_COUNTRY").HeaderText("Country").IsPrimaryKey(true).TextAlign(TextAlign.Left).ForeignKeyField("ID").ForeignKeyValue("DESCRIPTION").DataSource((IEnumerable<object>)ViewBag.CountriesDS).Width(90).ValidationRules(v
=> v.AddRule("required", true)).Add();
col.Field("ID_TYPE").HeaderText("Type").IsPrimaryKey(true).DefaultValue(0).ValidationRules(v
=> v.AddRule("required", true)).Add();
col.Field("UCI_FIELD").HeaderText("UCI").Width(100).TextAlign(TextAlign.Left).ValidationRules(v
=> v.AddRule("required", true)).Add();
})
.ClientSideEvents(eve =>
{
eve.EndAdd("GrdMaster_Add");
eve.RowSelected("GrdMaster_Select");
eve.EndEdit("GrdMaster_Edit");
eve.ToolbarClick("GrdMaster_Click");
})
)
</div>
But when we edit grid, an error appears;
TypeError: u.find(...).get(...) is undefined
...;u.find(".e-editcell").get(0).colSpan=d-v.find("td").not(":visible").length+h;v....
It seems, that the problem is with the PrimaryKey
field, that is showed with a DataSource combo.
Hi Gowthami
Thank you
very much for your atencion and your help
Best
regards