3.2.0

Grid not refreshed after runtime setCellImage

Dear all,

I am doing the following on a grid :
if col 0 is clicked, then image "delete" shall be displayed in the clicked cell...

so I wrote the following
Grid.onCellClicked = function(event, col, row)
{
if (col==0)
{
myImages[row][0] = "delete";
this.setCellImage("delete",row,col);
alert(this.getCellImage(row,col));
}
};

the alert message shows that the delete image is supposed to be in the cell, but it doesn't display... what should I do???

Thanks for help!

PS : I am using b4 and IE 6
Peg
January 31,
I must also say that "delete" image has been declared in css file, and is correctly displayed in other controls of the same page, so the problem does not originate from file source, or location!!!

thks
Peg
January 31,
Try to call refresh on that cell after you set the image.

this.setCellImage('delete', col, row);
this.getCellTemplate(col, row).refresh();


notice the switch of row/col in both calls. I do believe that all the calls in version 2 use col/row as the parameters, not row/col.

Jim Hunter
January 31,
Thks Jim, perfecto
Peg
January 31,

This topic is archived.

See also:


Back to support forum