I am trying to make a cell colored and clickable if it satisfies certain condition. The problem that I am getting is in passing the parameter to the onclick of the element. I am doing something like:
{
    name: 'numberOfUnits',
    index: 'numberOfUnits',
    sorttype: 'integer',
    cellattr: function (rowId, tv, rawObject, cm, rdata) {
        if (...) {
            return 'style="background-color:red" onClick="javascript:showReceivedLockedPieChartDialog(' + '\'' + lockedCellId + '\'' + ')"';
        }
        else {
            return 'style="color:black"';
        }
    }
}
I see that the text is being formed as:
style="background-color:red" onClick="javascript:showReceivedLockedPieChartDialog('ABC')"
I see that it is creating something like this...
<td aria-describedby="reportGrid_numberOfUnits" title="13" ABC")"="" onclick="javascript:showReceivedLockedPieChartDialog(" style="background-color:red" role="gridcell">13</td>
Please help me pass the parameter to this function.