Row added wih script doesnt allow me access to cells

Hi Support,

I have a strange one, I have a grid that is empty and I am adding rows using the api.

Once the form is complete, I try to read the addedd row in order to pass info back to the server.

When I use grd.cells(row_id, col_id).getValue();

It works for the first column but not for anyother, yet when I try grd.getColumnsNum() tells me there are 5 cols and they are all visible on screen.

Thanks In advance…


grd.cells(row_id, col_id).getValue();
Please chekc if col_id is index of a column, not id of the column

it is, it works fine if I use a grid that has been populated via xml, it only occurs when using a grid with a row added via javascript.

I’m using ie6 with the single dhtmlx.js suite file.

What issues occurs when you are using this code? Could you please send us any kind of sample where we can reproduce this issue?

When you add a row via javascript and using the api, yu can not then access cells apart from the first one.

Attached fudged sample recreates the issue.

Steps to recreate within the sample are:

  1. select an entry from the drop down list within the toolbar
  2. click the add button from within the toolbar
  3. click the submit to das button




Add Row (867 KB)

This issue occurs because of you set type only for the first column:
getValue() of the other cells is not difined that’s why issue occur. If you want to set column type to your column with setColTypes() method you should define types for all your cells:


Thanks a million