Display the dropdown and image in same cell

Hi,
i am trying to do coding with CellFormatter for displaying dropdown and warning image in same cell in List grid.Code is something like below.

formatCellValue : function (value, record, rowNum, colNum, grid)
{
//some condition goes here..
return “<table><tr></td><td align="right">+ displayvalue +<img src="/dbdi/web/app/pic/panel/db/warning.gif" border="0"></td></tr></table>”;
}
I am able to display both label and image in same cell as shown above.But how can i display both dropdown componet and imge in same cell.

Please suggest on this.

Take a look at ListGridField.valueIcons. These will appear both next to the value in the cell and inside the DropDown control. Let us know if this works for you.

Hi,
Thanks for your suggetion.
I tried by giving image path in valueIcons attribute.But not displaying any image next to the dropdown.Could you please correct me whether i am correct or not.Please find the below piece of code for one cell.
{name:“buyCurrency”, title:“<dbdi:label nlsIndent=”<%=nlsIdent%>" nlsKey=“YOU_BUY”/>“,showHover:true,canEdit: true,
type:“text”, width:“6%”, align:“center”,editorType:“SelectItem”,valueIcons:”/dbdi/web/app/pic/panel/db/warning.gif",
editorEnter:function (record,value,rowNum,colNum,grid)
{
updateBuyCurrencies(record,value,rowNum,colNum,grid);
},
changed:function (form, item, value, oldValue)
{
if(oldValue != value)
{
item.grid.setEditValue(item.rowNum, “notionalCurrency”, “”);
invalidateQuote(item.rowNum, item.grid);
item.grid.refreshCell(item.rowNum, item.grid.getFieldNum(“rate”));
}
},
editorProperties : {
textAlign:“left”,
align:“left”
}
},

Thanks in advance.

Again, the images will be inside the dropdown with valueIcons. That’s why we asked whether than made sense for you.

As far as your attempt, please actually read the docs for valueIcons.

need help

Hi,
I need the image next to the drop down component in the same cell.While Iam trying that image is coming inside the drop down which is not acceptable.Please provide us one example to this requirement like one drop down and next to that one image with out overlapping.

Thanks in advance

In that case, an override of getCellValue() will work. Call Super() and prepend an <img> tag (perhaps created by isc.Canvas.imgHTML()).

Need help reg listgrid

Hi Isomorphic,
Thanks for giving response with patience.

As per your suggetion,I was trying to use getCellValue() for Listgrid cell somthing like below code.But i was unable to display dropdown and image (next to the dropdown component).It is not returning the dropdown component.It is returning some value and image for all rows(i.e 20 rows).

same behavoir is for formatCellValues() also.

getCellValue:function(viewer, record, recordNum, field, fieldNum, value)
{
return “<table><tr><td align="center"><font class="DSSdrt">”+field+“</font></td></tr><tr><td align="right"><img src="/dbdi/web/app/pic/panel/warning.gif" width="11" height="12" border="0"></a></td></tr></table>”;
},

Thanks in advance.

Need urgently

Hi Isomorphic,
Could you please help on the above problem asap.
Please let me know if any other solution on this problem.
This is urgent requirement.

Thanks in advance.