We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Duplicate controls for Edit when InlineForm or Dialog

Thread ID:





130153 Apr 25,2017 03:44 PM UTC Apr 26,2017 05:01 PM UTC ASP.NET MVC 2
Tags: Grid
Mahir Palos
Asked On April 25, 2017 03:44 PM UTC

When using grid control for ASP.NET MVC 5 application and adjusting it as in demo provided, controls are duplicated for InlineForm or Dialog EditMode. Actually controls aren't duplicated but there are as many control sets there as records available. It seems as actual selection of record prior to editing has no effect whatsoever.

Here is relevant server side code:

        public ActionResult Edit()
            ViewBag.dataSource = db.Parties.ToArray();
            return View();

        public ActionResult InlineUpdate(Party value)
            Party result = db.Parties.Where(o => o.Id == value.Id).FirstOrDefault();
            return Json(db.Parties.ToArray(), JsonRequestBehavior.AllowGet);

        public ActionResult InlineInsert(Party value)
            return Json(db.Parties.ToArray(), JsonRequestBehavior.AllowGet);

        public ActionResult InlineDelete(int key)
            Party result = db.Parties.Where(o => o.Id == value.Id).FirstOrDefault();
            return Json(db.Parties.ToArray(), JsonRequestBehavior.AllowGet);

On a client side view is as follows:

@using Syncfusion.JavaScript.Models
ViewBag.Title = "Parties";
<div id="ControlRegion">
.Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.dataSource).UpdateURL("InlineUpdate").InsertURL("InlineInsert").RemoveURL("InlineDelete").Adaptor(AdaptorType.RemoteSaveAdaptor))
.EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.InlineForm); })
.ToolbarSettings(toolbar =>
toolbar.ShowToolbar().ToolbarItems(items =>
.Columns(col =>

Finally, result with either inline form or dialog is that there is sets as many as records there:

As the message implies, it seems that record selection isn't properly reflected in javascript code. Version used is and Sample Creator is used to devise solution.
Browser is Chrome 58.

Here is finally excerpt from final page source heading (if review of actual content/js is of some help):

    <link rel='nofollow' href="/Content/bootstrap.css" rel="stylesheet"/>
    <link rel='nofollow' href="/Content/site.css" rel="stylesheet"/>
    <link rel='nofollow' href="/Content/ej/web/Flat-Lime/ej.web.all.min.css" rel="stylesheet"/>
    <script src="/Scripts/modernizr-2.6.2.js"></script>
    <script src="/Scripts/jquery-3.1.1.min.js"></script>
    <script src="/Scripts/jsrender.min.js"></script>
    <script src="/Scripts/ej/ej.web.all.min.js"></script

Mahir Palos
Replied On April 25, 2017 04:11 PM UTC

This was fun. Only after 2 days struggling with it and after posting question here, found that it it necessary to have PrimaryKey column included on view. It must not be visible but after putting it there everything started to work just as usual.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On April 26, 2017 05:01 PM UTC

Hi Mahir, 

We are happy that the problem has been solved. 
Please get back to us if you need any further assistance.  

Thavasianand S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon