Own dhtmlx grid cell type

Hi,

thanks for previos reply (dhtmlx.com/docs/products/kb/inde … 95&a=20278).



I implement own dhtmlx grid cell with html input fragment like this:



function eXcell_input(cell){ //excell name is defined here

        if (cell){ //default pattern

            this.cell = cell;

            this.grid = this.cell.parentNode.grid;

            eXcell_ed.call(this); //use methods of “ed” excell

        }

    

        this.setValue=function(val){

            this.setCValue("",val);

        }

        

        this.getValue=function(){

            return this.cell.firstChild.value;                     // get input val

        }

    }

    

    eXcell_input.prototype = new eXcell;                     // nest all other methods from base class

    

    function checkKeyPressValue(e) {

        var characterCode;                                        //literal character code will be stored in this variable

        if (e && e.which) {                                     //if which property of event object is supported (NN4)

            e = e;

            characterCode = e.which;                             //character code is contained in NN4’s which property

        } else {

            e = event;

            characterCode = e.keyCode;                            //character code is contained in IE’s keyCode property

        }

        if (characterCode >= 48 && characterCode <= 57) {         //if generated character code is between 48 (number 0) and 57 (number 9)

            return true;

        } else {

            return false;

        }

    }

    

But i have a problem with loading cell value over API function “cellByIndex”,

dhtmlxGrid shut down on undefined value of cell property in function “cells4:function(cell){” online 865 of file dhtmlxdrif.js.



I dont know if is not needed to implement next prototype function for renred row or something like that.



Can you please give me some advice? Thanks, Michal.

Unfortunately we cannot reproduce this issue locally. Please check if parameters of cellByIndex method is existed row and cell indexes.