Get value of marked cell for CF server processing


I am trying to get the value of a marked cell in the dhtmlxGrid so that I can process that value in my cold fusion related code. I know from the docs listed that “getMarked()” will return the index location of the cell which has been marked by the user, but I need to know the value that is stored in that location. Once I have the value I need to set it in a variable that can be seen later in the user session. Can someone help me bridge this gap please?


You are using _marked.js extension, right?
Because if you are using grid in default mode ( row-selection ), value of cell can be obtained as

var id = grid.getSelectedRowId(); var ind = grid.getSelectedCellIndex(); var value = grid.cells(id,ind).getValue();

Hey Stanislav,

Apologies on the delay, I wasn’t notified of a response. I am using the _marked.js extension. I have attached my code below. Let me know what you think, and thanks for your time.


getMarked() method returns array of (row id, cell index) pairs for selected cells. Therefore you may use the following:

var markedCells = mygrid.getMarked();
for(var i = 0; i < markedCells .length; i++){
var cellPos = markedCells[i];
var value = mygrid.cells(cellPos[0],cellPos[1]).getValue();

Hey Alexandra,

Works like a charm. Thanks to you and Stanislav for helping me figure this out. =)