This is a migrated thread and some comments may be shown as answers.

Error in kendo javascript file

4 Answers 255 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 03 Apr 2014, 03:30 PM

I am working an application using Kendo Grid on an MVC application.  Starting at about 10:30 (central time) yesterday, the kendo grid software stopped working.  I am using IE 10 on a Windows 7 OS. The error is

Unhandled exception at line 3, column 23238 in http://cdn.kendostatic.com/2014.1.318/js/jquery.min.js
0x80020003 - JavaScript runtime error: Member not found.

I am able to replicate the error in a simple application.  The View file contains the following definition for the grid

 

@(Html.Kendo().Grid<MvcApplication1.Models.TestItem>()
  .Name( "testItemGrid" )
  .Columns( columns =>
  {
    columns.Command( command =>
    {
      command.Edit();
    } ).Width( 195 );
    columns.Bound( x => x.ItemId );
    columns.Bound( x => x.Name );
  } )
  .ToolBar( toolbar =>
  {
    toolbar.Create().Text( "Add New Item" );
  } )
  .Sortable()
  .Editable( editable => editable.Mode( GridEditMode.InLine ) )
  .DataSource( ds => ds
    .Ajax()
    .Model( m =>
            {
              m.Id( x => x.ItemId );
            } )
     .Read( "TestItemRead", "TestItemGrid" )
     .Create( "TestItemCreate", "TestItemGrid" )
     .Update( "TestItemUpdate", "TestItemGrid" )
    )
  )

 

The controller contains the following actions:
 

public class TestItemGridController : Controller
{
  public ActionResult Index()
  {
    return View();
  }
 
  public ActionResult TestItemRead( [DataSourceRequest] DataSourceRequest request )
  {
    List<Models.TestItem> items = new List<Models.TestItem>();
    items.Add( new Models.TestItem() { ItemId = 1, Name = "Item 1" } );
    items.Add( new Models.TestItem() { ItemId = 2, Name = "Item 2" } );
    items.Add( new Models.TestItem() { ItemId = 3, Name = "Item 3" } );
    items.Add( new Models.TestItem() { ItemId = 4, Name = "Item 4" } );
    items.Add( new Models.TestItem() { ItemId = 5, Name = "Item 5" } );
    return Json( items.ToDataSourceResult( request ) );
  }
 
  public ActionResult TestItemCreate( [DataSourceRequest] DataSourceRequest request, Models.TestItem testItem )
  {
    if( testItem != null && ModelState.IsValid )
    {
    }
    return Json( new[] { testItem }.ToDataSourceResult( request, ModelState ) );
  }
 
  public ActionResult TestItemUpdate( [DataSourceRequest] DataSourceRequest request, Models.TestItem testItem )
  {
    if( testItem != null && ModelState.IsValid )
    {
    }
    return Json( ModelState.ToDataSourceResult() );
  }
}

 

I have tried several things to fix the error:
1. Update to latest version of Telerik software
 2. Use CDN support
 3. Use Local support

 I am at my wits end to resolve this issue.  Please help!

4 Answers, 1 is accepted

Sort by
0
Leon
Top achievements
Rank 1
answered on 04 Apr 2014, 02:24 PM
I found that the Sortable() attribute is what's causing the grid to fail.  Don't know why, but when I comment it out on the grid, it started working again.  Need to determine why this is causing the problem because I need to be able to sort my grid columns.
0
Leon
Top achievements
Rank 1
answered on 04 Apr 2014, 04:03 PM
OK, I found the issue, but don't have a solution.  Turns out I somehow put the web site into compatibility mode.  When I cleared that compatibility setting, the kendo grids now work with the Sortable(). 

Maybe you can fix this issue?
0
Alexander Popov
Telerik team
answered on 07 Apr 2014, 11:46 AM
Hello Leon,

I would recommend specifying the DOCTYPE and the X-UA-Compatible meta tag. For example: 
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">


Regards,
Alexander Popov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Leon
Top achievements
Rank 1
answered on 07 Apr 2014, 01:48 PM
I put that meta tag in my _layouts.cshtml page and it appears to be working.  The DocType was already there.

Thank you.
Tags
General Discussions
Asked by
Leon
Top achievements
Rank 1
Answers by
Leon
Top achievements
Rank 1
Alexander Popov
Telerik team
Share this question
or