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.
Unfortunately, activation email could not send to your email. Please try again.

Getting "cloneArray is not defined" while defining a grid with AddNew column.

Thread ID:

Created:

Updated:

Platform:

Replies:

108841 May 15,2013 04:57 AM May 17,2013 04:36 AM ASP.NET MVC (Classic) 1
loading
Tags: Grid
Kedar Kodlapur
Asked On May 15, 2013 04:57 AM

I've a simple grid.
I added AddNew feature to the toolbar.


<div  id="grid"style="width:100%;">
    @(Html.Syncfusion().Grid<TestSyncfusion.Models.EntityModel.Item>("Frozen")
                .Datasource((IEnumerable<TestSyncfusion.Models.EntityModel.Item>)ViewData["gridData"])
                .Caption("Orders")
                .AutoFormat(Skins.Marble)
                .PageSettings(settings => settings.PageSize(15).PageCount(10))
                .ActionMode(ActionMode.JSON)
                .Column(columns =>
                {
                    columns.Add(p => p.ID);
                    columns.Add(p => p.ItemID);
                    columns.Add(p => p.CategoryID);
                    columns.Add(p => p.ItemName);
                    columns.Add(p => p.Type);
                })
                .ToolBar(tools =>
                                                     {
                                                         tools.Add(GridToolBarItems.AddNew);
                                                     })
         
                .Editing(edit =>
                                            {

                                                edit.AllowNew(true, "GridAddNewRow/AddItem");
                                                edit.PrimaryKey(key => key.Add(p => p.ID)); 
                                            })

                )
</div>


My controller looks like this:

public class GridAddNewRowController : Controller
    {
        //
        // GET: /GridAddNewRow/

        public ActionResult GridAddNewRow()
        {
            DebtSettlementEntities entities = new DebtSettlementEntities();
            var items = entities.Items.ToList();
            ViewData["gridData"] = items;
            return View();
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult GridAddNewRow(PagingParams args)
        {
            IEnumerable data = new DebtSettlementEntities().Items.ToList();
            ActionResult result = data.GridJSONActions<Item>();
            return result;

        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult AddItem(Item item)
        {
            DebtSettlementEntities en = new DebtSettlementEntities();
            en.Items.AddObject(item);
            en.SaveChanges();

            IEnumerable data = new DebtSettlementEntities().Items.ToList();
            ActionResult result = data.GridJSONActions<Item>();
            return result;

        }

    }

But when I click on AddNew button on the toolbar I get the following error.

  1. Uncaught ReferenceError: cloneArray is not defined
    1. (anonymous function)
    2. (anonymous function)MvcResourceHandler.axd:1
    3. Syncfusion.Mvc.Grid.JSONMode._AddActionMvcResourceHandler.axd:1
    4. Syncfusion.Mvc.Grid.GridControl.ToolbarSwitchOperationMvcResourceHandler.axd:1
    5. Syncfusion.Mvc.Grid.GridControl._toolbarClickHanderMvcResourceHandler.axd:1
    6. (anonymous function)MicrosoftAjax.js:5
    7. (anonymous function)MicrosoftAjax.js:5
    8. Syncfusion.Mvc.Tools.Toolbar._ClickHandlerMvcResourceHandler.axd:1
    9. (anonymous function)MicrosoftAjax.js:5
    10. k.handle.m



      Please help.

Eswari S [Syncfusion]
Replied On May 17, 2013 04:36 AM

Hi Kedar,

 

Thank you for using Syncfusion products.

 

The reported issue with ’ Kedar Kodlapur Getting "cloneArray is not defined" while defining a grid with AddNew column in JSON mode”

 has been confirmed as a defect; and we have already fixed the issue. However, we do not provide confidential information and patches in the general forum, so could you please create a new incident such that we can provide the patch for you.

 

Please let us know if you have any queries.

 

Regards,

Eswari S


CONFIRMATION

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.

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.

;