Is it possible to change the icon of tree data type dynamica

I’m developing an application. I need to have feature such that on right clicking the cell i need to change the image of the cell. Till now im just using ‘blank.gif’ as the default icon when creating tree data. Suppose i need to change it to "Folder icon " on clicking a button will i be able to do it . If so let me know how it is done ?



TreeGrid has next API call for such purpose

    treeGrid.setItemImage(rowId,url);

where
    rowId - row in question
    url - new image url ( please beware that url will be relative to default image path set to grid )