DropDownList crashes after Paging in a Grid

7 posts, 0 answers
  1. Kelly
    Kelly avatar
    5 posts
    Member since:
    Aug 2013

    Posted 21 Aug 2013 Link to this post

    I have attached a view.  It has three DropDownLists and a Grid.  Two of the DropDownLists provide values which filter the third and the Grid.  If I change a value in either of the two filtering lists, the third list and the grid change accordingly.  This all works just fine.  The grid often has more than one page, and I can change pages however I want, no problem.  However, if the grid has more than one page, and I change the page, then just select either of the two filtering lists, kendo/2013.1.514/jquery.min.js throws an error, saying o.activeElement is an “Unspecified error”.  This happens every time I follow this scenario.  By inserting an alert at the top of the lists' Change event handler, I can see that the error occurs before it even gets there.

    I don't expect it to be helpful, but I copied the Call Stack here:
     trigger [jquery.min.js] Line 3
      trigger [jquery.min.js] Line 3
      Anonymous Function [jquery.min.js] Line 4
      each [jquery.min.js] Line 3
      each [jquery.min.js] Line 3
      trigger [jquery.min.js] Line 4
      Anonymous Function [jquery.min.js] Line 5
      _toggle [kendo.all.min.js] Line 14
      toggle [kendo.all.min.js] Line 15
      Anonymous Function [kendo.all.min.js] Line 15
      dispatch [jquery.min.js] Line 3
      handle [jquery.min.js] Line 3
  2. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 22 Aug 2013 Link to this post

    Not sure what causes this strange error, but can you check whether resetting the grid page index manually when changing the selection in the dropdowns as follows:

    $("#your_grid_div").data("kendoGrid").dataSource.page(1);
    prevents it?

    Also you may compare the behavior with the most recent version (2013.2.716) as I see the version you use is a bit behind.

    -K


  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Kelly
    Kelly avatar
    5 posts
    Member since:
    Aug 2013

    Posted 22 Aug 2013 Link to this post

    As I noted in the original ticket, the crash occurs before the Change event handler for the dropdowns is called, so, even though I reset the page as suggested, it doesn't get there.  I did update my scripts to the latest, but the crash still occurs in the same place as before.  I have also tried both jquery-1.7.1 and 1.8.2.
  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 26 Aug 2013 Link to this post

    Hello Kelly,

    It is hard to say what exactly goes wrong just from the explanation, by the way the jQuery version that you need to use with the latest version of kendo is 1.9.1

    http://docs.kendoui.com/getting-started/javascript-dependencies#jquery-version

    I would like to ask you to demonstrate the behavior that you described with a sample project so we can investigate further.

    Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Kelly
    Kelly avatar
    5 posts
    Member since:
    Aug 2013

    Posted 26 Aug 2013 Link to this post

    I am working with the current trial version of KendoUI.  I created a new project using the KendoUIMvcApplication wizard.  It built a Scripts folder and brought in jquery-1.8.2.js, along with jquery-1.8.2.intellisense.js, jquery-1.8.2.min.js, and seven other jqueryXXX files that do not have a version number in their names (like jquery.unobtrusive-ajax.js and jquery.validate.js).  It also created a kendo folder in which there is a 2013.2.716 folder that has a jquery.min.js file that is 1.9.1.  This is the particular script where the error is occurring, so maybe it was misleading of me when I said I had tried it with 1.8.2, just because that is in the Scripts folder.  Since you need 1.9.1, why did the wizard bring in 1.8.2?  Are the scripts outside the kendo folder necessary? Should I be trying to replace the ones with 1.8.2 in their names?  

    Thanks!
  7. Kelly
    Kelly avatar
    5 posts
    Member since:
    Aug 2013

    Posted 26 Aug 2013 Link to this post

    I have found some chatter about a similar problem in IE 9 iFrames, and the suggested fix is below.  This doesn't work for me - I'm not using iFrames and the problem isn't happening at the loading of a page, but on the click of a dropdownlist.  I thought it might be relevant, however, or that it might suggest a clue...  I can run my app in Chrome without this problem, but I must deliver on IE 9.
    $(function () { document.documentElement.focus(); });
  8. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 28 Aug 2013 Link to this post

    Hello again Kelly,

    All the scripts vital for the Kendo framework are inside the kendo folder, adding unobtrusive validation and other scripts is up to the developer (if he needs it or not), however when adding them you need to be careful for the following problems:

    http://docs.kendoui.com/getting-started/troubleshooting

    If you still struggle create sample project and share it here or in a support ticket so we can investigate further.

    Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready