this.cellType is null or not an object loading Grid

I’m using the grid with the xmlB template. I get ‘this.cellType’ is null or not an object when the grid loads. The error is on line 3179 of the uncompressed dhtmlxgrid.js (in the isTreeGrid method). Code looks like this:


var gridSearchResults = new dhtmlXGridObject({
  parent: 'searchResults',
  image_path: '../scripts/frameworks/dhx-2.5/imgs/',
  skin: 'modern',
  columns: [
    {label: 'Name', width: '*'},
    {label: 'Type', width: '80'},
    {label: 'Category', width: '80'}


var timeoutHandle;

var lastSearch="";
function doSearch (searchString) {
  if (searchString != lastSearch && searchString != "") {
    lastSearch = searchString;
    if (timeoutHandle)
    timeoutHandle = setInterval(reloadGrid, 500);

function reloadGrid () {
  gridSearchResults.load("productfundservice.asmx/productFundSelectionSearch?cname=" + document.getElementById('searchString').value, 
    function () {
      if (timeoutHandle)

I’ve also tried putting the column types and IDs in the constructor object, but I get the same error. The XML returned looks like this:

<?xml version="1.0" encoding="utf-8"?>
  <row id="25">

Javascript files being loaded:

  <script type="text/javascript" src="../Scripts/Frameworks/dhx-2.5/dhtmlxcommon.js"></script>
  <script type="text/javascript" src="../Scripts/Frameworks/dhx-2.5/dhtmlxgrid.js"></script>
  <script type="text/javascript" src="../Scripts/Frameworks/dhx-2.5/dhtmlxgridcell.js"></script>
    <script type="text/javascript" src="../Scripts/Frameworks/dhx-2.5/ext/dhtmlxgrid_data.js"></script>
  <script type="text/javascript" src="../Scripts/Frameworks/dhx-2.5/ext/dhtmlxgrid_keymap_excel.js"></script>

I’ve confirmed using Fiddler that all files are loading.

Any ideas on what I’m missing?



Unfortunately we cannot reproduce this issue locally. You can check example here … o_api.html

If issue still occurs please open ticket at and provide us complete demo where we can reproduce this issue.

I’m still having the issue. Attached is a sample that reproduces it. I investigated a little further. It looks like cellType is set to an array of column types after the constructor runs, but when I call the init the following code runs which causes cellType to be set to null (starts at line 365 of uncompressed dhtmlxgrid.js):

if (this.hdr.rows.length > 0){

Thanks for your help,

Josh (1.47 KB)

Try to comment the following line:


Will this issue occur?


If I remove the call to the init() method, everything works fine. Now I’m confused about when I should use that method. In the past it seems like I’ve needed it.

By the way, I just tried smart rendering for the first time and it works great. Huge speed improvement even without dynamic loading.



Now I’m confused about when I should use that method. In the past it seems like I’ve needed it.
If you are using object-initialization you have not to use init() method.
In your case when you call init() method grid configuration rewrites. This issue confirmed and will be fixed at next version of dhtmlxGrid.