Completed
Last Updated: 13 Nov 2020 13:51 by ADMIN
Release 2020.R3.SP.next
Steven
Created on: 12 Oct 2020 18:44
Category: Grid
Type: Bug Report
1
Adaptive non-scrollable grid throws JS errors on delete

As the title says, I'm getting script errors when attempting to perform a delete function with an MVC grid when in MobileMode.Phone.  The attached project will illustrate the problem.  Just run it and select delete button for one of the items in the far right column.  A popup will appear, but don't click either of the buttons on it yet.  Inspect the html with whatever browser you use (I'm using chrome so I just right click and choose select).  There will be a "Cannot read property 'data' of undefined" error.  If you then click the "Delete" button, you'll get a "Cannot read property 'resolve' of undefined".  Then click on the "Cancel" button and you'll get "Cannot read property 'reject' of undefined".  I'll attach a pic showing these errors.

I need to be able to utilize my grid in mobile phone mode and delete items.  Please help with this.

Also, to get this sample project small enough, I removed the files from the MobileSaveError\lib\KENDOUIMVC\2020.3.915.545 folder.  I figure you can replace those easily enough.  Is that the right thing to do in this case?  I thought maybe I could remove the items in the Packages folder as NuGet/VS will usually restore those.  But wasn't 100% sure on that.  So if you can tell me or link me to an article about what we can remove to shrink the project size for samples when we need to send them, that would be great.

Thank you,
Steven

3 comments
ADMIN
Alex Hajigeorgieva
Posted on: 16 Oct 2020 13:48

Hi, Steven,

I have confirmed this to an official bug report and you can find it here:

https://feedback.telerik.com/aspnet-mvc/1489507-adaptive-non-scrollable-grid-throws-js-errors-on-delete

If you prefer to track the issue on GitHub, you may subscribe here:

https://github.com/telerik/kendo-ui-core/issues/6080

As for expanding the grid height, you can achieve that with some CSS, take a look at several options listed in this knowledge base section:

https://docs.telerik.com/kendo-ui/knowledge-base/resize-grid-when-the-window-is-resized

Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Steven
Posted on: 13 Oct 2020 17:21

Alex,

Feel free to convert this to a public bug report.  May save someone else some time!

As far as making the grid scrollable... it isn't ideal but will have to do for the time being.  What we ultimately want is for the grid to be able to display its vertical contents completely and the user scroll through the records by scrolling the main window on their phone, not by scrolling the grid.  Hopefully this issue will be resolved in a release in the not-so-distant future.

Thank you,
Steven

ADMIN
Alex Hajigeorgieva
Posted on: 13 Oct 2020 16:26

Hi, Steven,

Thank you so much for the provided project. Indeed, you may delete the packages folder as well as bin and obj which get generated. Not including the Kendo.Mvc.dll or script/styles files if they are hosted on the server is also a space saver and using the CDN instead but rarely needed.

I was able to narrow the errors down to the grid Scrollable() method. If you add it to the grid configuration, the errors go away.

 @(Html.Kendo().Grid<MobileSaveError.Models.Test123VM>()
        .Name("grid")
        .Scrollable()

I will discuss this with the team at length and will get back to you with more details. Do you mind if I convert this to a public bug report? I can remove the project and image if you like as I reproduce the issue in a Dojo as well:

https://dojo.telerik.com/@bubblemaster/IcirImOt

Meanwhile I hope that using a scrollable grid is acceptable for you, if not let me know and I will also search for a feasible workaround for a non-scrollable grid.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.