dhtmlxGrid - how to get the grid object using row Id

Discussions converted from DHTMLX KB which were not assigned to any category but still regard various DHTMLX components. Do not post new questions here!

How can I get a reference to the grid object whose rowId is known to me.

This is the scenario where I have multiple subgrids for a given grid. I select a row in one of the subgrids and I want to know which subgrid it belongs to.

I am looking for something like getParentGrid(rowId).

Please suggest.

Gaurav Arora
Gaurav Arora
Posts: 20
Joined: Sat Jan 23, 2010 6:52 pm

Unfortunately there is no such method

Are you calling this code from some event of grid ? Each grid's event has reference to related grid object, you can use "this" which points to the grid object inside any custom event attached to the grid. ( if same event attached to multiple grids, "this" will point to the grid which is actually fires event )

In common case, you can check is grid has row with such id by using

if (grid.getRowById(id)) alert("such row exists");
Posts: 8372
Joined: Sat Jan 23, 2010 11:52 am

Return to Uncategorized discussions

Who is online

Users browsing this forum: No registered users and 86 guests