Uncaught TypeError: Cannot read property '3' of undefined

OKay,I really need someone to help me with the somelike problem:
my console always show bellow error:

Uncaught TypeError: Cannot read property ‘3’ of undefined dhtmlx.js:9 dhtmlXGridObject.cells2 basic_information.php:409
(anonymous function) jquery-1.7.2.min.js:2
f.Callbacks.o jquery-1.7.2.min.js:2
f.Callbacks.p.fireWith jquery-1.7.2.min.js:2
e.extend.ready jquery-1.7.2.min.js:2 c.addEventListener.B

sometimes,my codes work well without above error.But mostly,I got error like above,I thought that when I use function to get cell object then I will get error,such as cells2/cells/getcellById etc.
I really confuse with it.May be my dhtmlx.js is wrong?or the error is caused by my own code?

someone please explain it to me and give me some solution to avoid such errors.

OK.I find the reason that I get this error,that is I have used some parameter in the function,such as:

[code] var rowCount1=myGrid.getRowsNum();
for(i=0;i<=rowCount1;i++){
number1 = myGrid.cells2(i,3).getValue();
number2 = changeTwoDecimal_f(number1);
if(number2<0){
myGrid.cells2(i,3).setValue(0);
}else{
myGrid.cells2(i,3).setValue(number2);
}

                    value0 = myGrid.cells2(i,0).getValue();
                    newvalue0 = value0.split("^");
                    newvalue1 = newvalue0[0];
					//console.log(newvalue1);
					var rowID=myGrid.getRowId(i);
                    myGrid.cells2(i,0).setValue(newvalue1+"^javascript:open_win("+rowID+");");
                }[/code]

cells2(i,3) leads to the error when I uss i in cells().

The question is how can I avoid this error ?or I ignore the error?

Please, try to use:
for(i=0;i<rowCount1;i++){
instead of
for(i=0;i<=rowCount1;i++){

If the problem still occurs for you please, provide with any kind of sample of your code with the init of your grid and an example of the data populating to the grid.

Wow,bro
Tank you very much!
I have solved my problem by your solution.I made such a simple mistake with my for loop,hah, :smiley:
Tanks again!