Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by andreea on May 20, 2008 01:42
open dhtmlx forum
i get an warning saying that the row does not exists

I have  this xml:
  <?xml version='1.0' encoding='UTF-8' ?&gt;
- <rows&gt;
- <row id='1656'&gt;
....

if i do this alert(mygrid.cells(0,0).getValue()); i get an warning saying that the row does not exists....how do i get the cell value?
Answer posted by Support on May 20, 2008 05:53
There are two possible issues

a) incorrect command usage
    grid.cells - uses ID as first parameter so you need to use
    grid.cells(1656,0).getValue()
    or
    grid.cells2(0,0).getValue();

b) Please be sure that command called after data loaded ( the data loading is async )
Answer posted by Voxyn on Aug 20, 2008 03:01
I get this error too and it is not reproducable.
I populate the grid with an XML file and html code inside and when clicking on a row
the user can select to operate on the row. Multiselect is enabled and on some occasions
the user gets the error that the row does not exist. I try to reproduce it but there is no system
behind the error. After refreshing the page and doing the same steps the error does not occur which
is strange.The data is loaded and the grid is
visible at the time the user operates with it.
Is there any hint you can give me to solve this annoying problem?
Answer posted by Support on Aug 20, 2008 03:21
Please be sure that row ahs unique IDs and all column types defined correctly. ( setColTypes command has correct arguments )
Is problem occurs for rows loaded from XML or for rows added by javascript (addRow) ?
Answer posted by Voxyn on Aug 20, 2008 03:39
Problem occurs with both js and xml rows. The used type of col is only "ro"
Answer posted by Support on Aug 20, 2008 05:31
It hard to suggest anything without ability to reconstruct issue. If it possible - please provide any kind of sample or demo link, where issue can be reconstructed. 

The most common situation for "not repoducable" errors is loading routine. While first time data loaded from server side, second time it can load from cache and it will change behavior. 
Please be sure that your code executed only when grid loaded ( usage of onXLS event or second parameter of loadXML )