Display link in a grid cell


We use the following code in XML to display a link in a grid cell which when clicked calls a JS function.

<![CDATA[ Func1 ]]>"

where callFunc() is a JS method.

It works fine but how do I display a link in a grid cell which calls a JS function if I am setting the grid data in JS not from XML?

Is there a way to set it using ‘myGrid.cells(rowId, 3).setValue();’ where we can set the setValue parameter?

setValue accepts any value, including HTML
    myGrid.cells(rowId, 3).setValue(" Func1  “);

or you can use it directly while creating new rows

    myGrid.addRow(id,[“A”,” Func1 ",“C”]