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.

Child grid error

Thread ID:

Created:

Updated:

Platform:

Replies:

123879 Apr 28,2016 02:02 PM Apr 2,2018 03:32 AM ASP.NET MVC 7
loading
Tags: Grid
Martin Hoyle
Asked On April 28, 2016 02:02 PM

Hi

I have a master detail grid. I have enabled CRUD on the child grid.

The child grid does not correctly update after an edit.

eg
If there are 2 rows in the child grid and 1 edit the last row to remove it from the grid I get an error

0x800a139e - JavaScript runtime error: HierarchyRequestErrorUnhandled exception at line 10, column 2381213 in http://localhost:62974/Scripts/ej/ej.web.all.min.js


If I edit the first of the 2 rows nd remove it from the grid the child grid is displayed but with 2 copies of the second row. The datasource is correctly returning 1 row !

Is CRUD on a child grid nor supported or is this a known issue ??

Regards

Martin



Ragavee U S [Syncfusion]
Replied On April 29, 2016 12:25 PM

Hi Martin, 

Thanks for contacting Syncfusion support. 

We are sorry that the reported issue is not reproducible at our end. We have created a  hierarchy grid with CRUD enabled for child grid, which can be downloaded from the below location. 


Please try the above sample and if you still face any issues, please share below details, 

1.       Product version that you are currently working on. 
2.       Issue reproducible sample or please reproduce the issue in the above provided sample and share. 
3.       Screenshot of the call stack of the script error obtained. 
4.       Type of the data adaptor that you are using for data binding and CRUD operations. 

Regards, 
Ragavee U S. 


Martin Hoyle
Replied On April 30, 2016 02:25 PM

Hi

Thanks for the sample.
If you change the datasource of the child grid to a url adapter.

childnew.Datasource(ds => ds.URL(@Url.Action("DataSourceA")).InsertURL("/Home/Insert").UpdateURL("/Home/Update").RemoveURL("/Home/Delete").Adaptor(AdaptorType.UrlAdaptor ))

and add a controller action

       public ActionResult DataSourceA(DataManager dm)
        {
            int key = 0;
            var DataSource = OrderRepository.GetAllRecords().ToList();
            DataOperations operation = new DataOperations();
            if (dm.Where != null)
            {
                key = int.Parse(dm.Where[0].value.ToString());
                DataSource = DataSource.Where(emp => emp.EmployeeID  == key).ToList();
            }
            DataResult result = new DataResult();
            if (dm.Skip != 0 || dm.Take != 0)
                result.result = DataSource.Skip(dm.Skip).Take(dm.Take).ToList();
            else result.result = DataSource;
            result.count = DataSource.Count();
            return Json(result, JsonRequestBehavior.AllowGet);
        }



If you then try and edit the last child record for an employee and modify the Employee ID field you get exactly the same error as I am experiencing ( runtime error )
If you edit the first child record the child grid is displayed but with a duplicated first entry.

I have attached the modified sample.

Regards

Martin








Attachment: Sample_3e0af096.zip

Ragavee U S [Syncfusion]
Replied On May 2, 2016 08:18 AM

Hi Martin, 

We considered this query “Duplicate rows created when editing the queryString column and saving in child grid” as a bug and a support incident has been created under your account to track the status of this feature. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents 

Regards, 
Ragavee U S. 


Martin Hoyle
Replied On May 2, 2016 02:11 PM

Hi

Thanks - I look forward to the update.

Will this also fix the problem when editing the last element of the child grid ?

Regards

Martin


Ragavee U S [Syncfusion]
Replied On May 3, 2016 12:16 AM

Hi Martin, 

Yes. We have included “Editing the last record in child grid throws script error” also to our issue description and thus it will also be fixed. Please follow up the incidents for further updates 

Regards, 
Ragavee U S. 


Lolita
Replied On March 30, 2018 07:01 PM

Thanks

Thavasianand Sankaranarayanan [Syncfusion]
Replied On April 2, 2018 03:32 AM

Hi Lolita 
 
Thanks for the update. 
 
Please let us know if you have any technical assistance. 
 
Regards, 
Thavasianand 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.

;