Image and URL in diff cells issue

I am having an issue with the function .addRow. My function is as follows. The issue is my lack of understanding on the exact usage of the [ ] characters.

Thanks again for your time


grdNewOrderSelections = new dhtmlXGridObject(‘grdNewOrderSelections_Container’)







function gridAddRowNOSSItem(iQty,sItem,mPrice) {

var iRow = (grdNewOrderSelections.getRowsNum() + 1);

var sURL = “<a href=’#’ title=’”+sItem+"’ style=‘color:#81a032;font-family:Arial;font-weight:bold;font-size:9pt;text-decoration:none;’ onclick=“showItemDetails(’”+iRow+"’,‘3’,’"+sItem+"’);">"+sItem+"";

var sImageDeleteURL = “

grdNewOrderSelections.addRow(iRow,[iQty,sURL,mPrice+sImageDeleteURL]); //close! but wrong

// grdNewOrderSelections.addRow(iRow,[iQty,sURL,mPrice,sImageDeleteURL]); //displays the missing image icon. Why?



This command means that 3rd column value will be “mPrice


This command means that 3rd column value will be “mPrice”, 4th column value will be “


>>This command means that 3rd column value will be “mPrice”, 4th column value will be “

Ok, thanks.  However as shown in the original post this line of code is not working.  The image is correct (triple checked) and if I include it as: grdNewOrderSelections.addRow(iRow,[iQty,sURL,mPrice+sImageDeleteURL]);   the the image displays as part of the third column.  However no matter what tweaks I attempt the image is not displayed in the 4th column.

What am I doing wrong?


Sorry for the misleading information. If your 4rd column has type “img”, sImageDeleteURL variable should looks like that:

var sImageDeleteURL = “images/btnDelete.jpg”