How do I can take row Id in grid?

Hello.

How do I take row Id in grid?
I looked for a way in the documentation but couldn’t find it.

[ my code ]

//onload
var objectList = new dhx.Grid(“objectList_div”, {

selection : “row”,

}

// another function

var objectListRowId = (how?)

I used objectList.getSelectedRowId() method in Dhtmlx Suite 5.x.
How do i can in Dhtmlx Suite 7.x?

I look forward to your reply.
thanks.

grid.selection.getCells().length !== 0 ?
		grid.selection.getCells().map(function (item) { return item.row.id; }).join(',') :
		(grid.selection.getCell() ? grid.selection.getCell().row.id : null)
1 Like

Oh thank you very much.
I’ll try it.