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

kendo grid: what script files do I include?

9 Answers 1742 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 18 Sep 2012, 02:43 PM
Im looking at alot of examples and also the documentation and cant find a clear explanation of what script files are required.

Therefore im getting the following script crash error.

Unhandled exception at line 10, column 1735 in http://localhost:10312/Scripts/kendo/2012.2.710/kendo.grid.min.js
0x800a138f - Microsoft JScript runtime error: 'ui' is null or not an object

Im currently including the following script files:

 kendo.grid.min.js,
kendo.web.js, 
jquery-1.8.0.min.js

And im trying out the simple table example on the docs page at kendo.

Entire page code below:

<script src="~/Scripts/jquery-1.8.0.min.js"></script>
<script src="~/Scripts/kendo/2012.2.710/kendo.grid.min.js"></script>
<script src="~/Scripts/kendo/2012.2.710/kendo.web.min.js"></script>




 <table id="grid">
  <thead>
      <tr>
          <th data-field="title">Title</th>
          <th data-field="year">Year</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Star Wars: A New Hope</td>
          <td>1977</td>
      </tr>
      <tr>
          <td>Star Wars: The Empire Strikes Back</td>
          <td>1980</td>
      </tr>
  </tbody>
 </table>


<script type="text/javascript">
    $(document).ready(function () {
        $("#grid").kendoGrid();
    });


</script>

9 Answers, 1 is accepted

Sort by
0
Nohinn
Top achievements
Rank 1
answered on 18 Sep 2012, 03:21 PM
Just including the jquery reference, and the reference to kendo.web.min.js (or kendo.web.js if you want to debug any error) is enough, here you have a sample:
http://jsbin.com/udijug/1/edit 

If even with that does not work for you try using the jquery version that comes with the kendoui framework.
0
Steve
Top achievements
Rank 1
answered on 18 Sep 2012, 09:03 PM
I changed it to the code down below and now Im getting object doesnt support this property or method on this line:
====================
   $("#grid").kendoGrid(); 
====================


<script src="/Scripts/jquery-1.8.0.js"></script>
<script src="/Scripts/kendo/2012.2.710/kendo.web.min.js"></script>
<script src="/Scripts/kendo/2012.2.710/kendo.core.min.js"></script>
<script src="/Scripts/kendo/2012.2.710/kendo.data.min.js"></script>
<script src="/Scripts/kendo/2012.2.710/kendo.grid.min.js"></script>


 <table id="grid">
  <thead>
      <tr>
          <th data-field="title">Title</th>
          <th data-field="year">Year</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Star Wars: A New Hope</td>
          <td>1977</td>
      </tr>
      <tr>
          <td>Star Wars: The Empire Strikes Back</td>
          <td>1980</td>
      </tr>
  </tbody>
 </table>


<script type="text/javascript">
    $(document).ready(function () {
        $("#grid").kendoGrid();
    });


</script>

0
Nohinn
Top achievements
Rank 1
answered on 18 Sep 2012, 10:58 PM
kendo.web.min.js already includes the code from everything you need to use the kendoui web framework, you only need this one along with jquery:
<script src="/Scripts/jquery-1.8.0.js"></script>
<script src="/Scripts/kendo/2012.2.710/kendo.web.min.js"></script> 

Otherwise you will be overriding functionalities and make kendo.web.min not to work, like it is happening to you right now.
0
Steve
Top achievements
Rank 1
answered on 19 Sep 2012, 01:21 PM
I did that.  But I still get this error. 

Unhandled exception at line 66, column 9 in http://localhost:10312/
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support this property or method

It breaks on this line:  

 $("#grid").kendoGrid();

Im just using the example that is in the documentation on this site.  Super simple sample.  But its crashing.

0
Nohinn
Top achievements
Rank 1
answered on 19 Sep 2012, 01:34 PM
And you're not referencing twice the jquery file by any chance?
Could you post the entire html code? from "<html>" to "</html>"
0
Steve
Top achievements
Rank 1
answered on 19 Sep 2012, 02:14 PM
Everything you see is there.  Its a cshtml file.  There are no html or head tags.

<script src="/Scripts/jquery-1.8.0.js"></script>
<script src="/Scripts/kendo/2012.2.710/kendo.web.min.js"></script> 


 <table id="grid">
  <thead>
      <tr>
          <th data-field="title">Title</th>
          <th data-field="year">Year</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Star Wars: A New Hope</td>
          <td>1977</td>
      </tr>
      <tr>
          <td>Star Wars: The Empire Strikes Back</td>
          <td>1980</td>
      </tr>
  </tbody>
 </table>


<script type="text/javascript">
    $(document).ready(function () {
        $("#grid").kendoGrid();
    });


</script>
0
Steve
Top achievements
Rank 1
answered on 19 Sep 2012, 06:33 PM
See attached pic of the exact demo on im trying to run....except they dont show which files to include.  
0
Vladimir Iliev
Telerik team
answered on 21 Sep 2012, 12:45 PM
Hi Steve,

After reviewing the provided code it seems that the issue comes from using unsupported version of jQuery - please note that KendoUI v.2012.2.710 supports jQuery v.1.7.1. In order to use the newer versions of jQuery - 1.8+ you should upgrade your KendoUI to Q2 SP1 - v.2012.2.913. 

Also you can read about KendoUI Javascript dependencies article for more information about required scripts by each widget.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
shazi
Top achievements
Rank 2
answered on 25 Mar 2013, 10:08 AM
Microsoft JScript runtime error: Object doesn't support property or method 'kendoGrid'

even i have checked all of abv possibilities.. :/ still no luck!!
Tags
Grid
Asked by
Steve
Top achievements
Rank 1
Answers by
Nohinn
Top achievements
Rank 1
Steve
Top achievements
Rank 1
Vladimir Iliev
Telerik team
shazi
Top achievements
Rank 2
Share this question
or