Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by andreea on Jun 03, 2008 09:41
open dhtmlx forum
i need the index for the xml:

Is but i don't want the value inside the cell!!!!! i need the index
for the xml:  <?xml version='1.0' encoding='UTF-8' ?&gt;
- <rows&gt;
- <row id='1'&gt;
  <cell&gt;Jun 1905 12:00:00:000AM</cell&gt;
  <cell id='17'&gt;iasi</cell&gt;
  <cell id='1'&gt;StopLaConstanta</cell&gt;
  <cell id='7'&gt;Pascani</cell&gt;
  <cell id='18'&gt;StopLaBotosani</cell&gt;
  <cell&gt;1</cell&gt;
  <cell&gt;1</cell&gt;
  </row&gt;
- <row id='2'&gt;
  <cell&gt;Jun 1905 12:00:00:000AM</cell&gt;
  <cell id='21'&gt;Iasi</cell&gt;
  <cell id='2'&gt;StopLaDD</cell&gt;
  <cell id='9'&gt;ccc</cell&gt;
  <cell id='22'&gt;StopLaBB</cell&gt;
  <cell&gt;0</cell&gt;
  <cell&gt;0</cell&gt;
  </row&gt;
  </rows&gt;
mygrid.cellById(1,1).getValue() returns iasi , i need it to return the index : 17


Answer posted by Support on Jun 03, 2008 10:38
cellById ( alias of grid.cells ) return excell object for the cell specified by row_id and column_index
If you need to get not cell value, but some attribute of cell tag you can use
    mygrid.cellById(1,1).getAttribute("id"); // returns 17

http://www.dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Storing_additional_data.html