cellAt( c, r) gives me a cell TD element, I need the cell object like activeCell gives me, how can I get this?
Hi Seang,
The cellAt method is designed to return a DOM element. If you want an object you can wrap the result in a jQuery object like this: $($('#grid').igGrid('cellAt', 1,1)).
I hope this helps!
Kind regards, Petko Zhekov Software Engineer
sounds like what I need but didnt work.
If I'm on cell 1,1 and do this
cell = this.gridIDMap.activeCell();alert(cell.rowIndex )
it alerts 1
If want to get that cel via cellAt I do this
cell = this.gridIDMap.cellAt( 1,1 )cell = $( cell )//wrap it in jQuery alert( cell.rowIndex )
it alerts undefined
Hi,
The activeCell method returns the result of an user interaction. That’s why it gives more detailed information like rowIndex, columnKey, etc. In the case with cellAt the developer provides most of the information as a parameters – column index and row index. The column key can be easily extracted from grid’s columns collection. If this does not work for you you can give me more detailed information about your case and I'll do my best to provide you a solution.
I'm looking forward to your reply!
I see, well here is why I need this. I wrote a large piece of code that uses the return cell object from an active cell. Now I want to use the same code without predefining a tun of vars. Certainly I can do that as you mentioned, though I'm looking to keep things clean. So I really want a cell object from a callAt some how? If that is not possible ill just make a fake cell object. Can you show an example of this grid’s columns collection way to get the column key ?
fake cell object has been working ok.