Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Juergen on Nov 22, 2007 12:44
open dhtmlx forum
cell Info

Hello everyone,

I use a dhtmlxgrid with a tree. the cells are editable.
I generate the table dynamically.
If I edit a cell I want to write this info in the DB.

To do so I need the column name and the tree location of that cell.

The problem:
1. I can't use mygrid.getHeaderCol(). If I use it I get the name of the main column. But I added sub solumns with attachHeader.
2. I can get the current tree position of the cell, but not all the parents.


Any idea?

Thanks!

bye
juergen
Answer posted on Nov 23, 2007 03:35
>> If I use it I get the name of the main column. But I added sub solumns with attachHeader.
You can access sub column by direct dom links as

    grid.hdr.rows[indA].cells[indB].innerHTML
    indA - row index in header
    indB - column index

but usage of column's IDs may be much more reliable solution

>> I can get the current tree position of the cell, but not all the parents
If you know item ID , you can get its parent ID as
    var parentID=grid.getParentId(ID);