Anyone know of any good examples of how to get the value contained by a cell in a grid? Or a simpler problem that pertains to my situation: just how to get the value of the first cell when a row is selected?
Thanks!
Anyone know of any good examples of how to get the value contained by a cell in a grid? Or a simpler problem that pertains to my situation: just how to get the value of the first cell when a row is selected?
Thanks!
To get data out of a single
To get data out of a single cell
var value = gridWidget.model.getDatum(rowIndex, colIndex);
To see if a row is selected use
function isRowSelected(i_rowIndex)
{
var selectedRows = _gridWidget.selection.getSelected();
var i;
for (i = 0; i < selectedRows.length; i++)
{
if (selectedRows[i] == i_rowIndex)
return true;
}
return false;
}
Regards
> To get data out of a
> To get data out of a single cell
>
> var value = gridWidget.model.getDatum(rowIndex, colIndex);
That no longer works with the new model-less DataGrid in Dojo 1.2.
OTOH, this appears to work:
var value = gridWidget.views.views[0].getCellNode(rowIndex, colIndex).innerHTML
Better suggestions, anyone?
Talking about which: where can I find API documentation for the new DataGrid 1.2?