DHTMLX Grid : Show Context Menu for a particular CELL edit o

Hi there,

Can I have following things done in our grid, treegrid ?



1> Want to show right click context menu for A PARTICULAR CELL so that I can edit a cell only, not the whole row. Also, When I click on edit option of context menu for a cell, it should show the editbox directly instead of need to double click the cell to edit it.

2> How to attach image along with text shown on first column.

3> Also how to give color to whole column. Basically I want all columns except one to have white color and all rows to have white colors

except one.

Want to show right click context menu for A PARTICULAR CELL
so that I can edit a cell only, not the whole row. Also, When I click
on edit option of context menu for a cell, it should show the editbox
directly instead of need to double click the cell to edit it.

You can conrol context menu by using onBeforeContextMenu event
    grid.attachEvent(“onBeforeContextMenu”,function(id,ind){
       if (ind == necessary_one ) return true;
       else return false;
    });
such code will allow context menu only for necessary column.
To initiate edit from menu command you can use defautl way to handle context menu commands and call selectCell and editCell against necessary cell.

>>How to attach image along with text shown on first column.
Technically , it possible to place any html as cell content

    <![CDATA[   some text ]]>

>>3> Also how to give color to whole column. Basically I want all
columns except one to have white color and all rows to have white
colors
    mygrid.setColumnColor(“white,white,white,gray”);  

Hi,
    Will the following code work for CELL(means any cell[Not Column] where I will right click to show context menu) ???

Any cell in data part of grid ( not header ) will generate onBeforeContextMenu event before showing context menu. So code proposed above will work for any cell in  grid.

How can I attach image along with text shown by script not in XML file ?
How to show right click context menu for the cell on which I right click context menu ?


>>How can I attach image along with text shown by script not in XML file ?
You can freely use HTML as cell values, when adding rows from js script
grid.addRow(some_id,[“a”," b text",“c”]);



>>How to show right click context menu for the cell on which I right click context menu ?
If you are using dhtmlxmenu as context menu , you can use
grid.enableContextMenu(obj);
In case of custom menu , you can use onRightClick event



dhtmlx.com/docs/products/dhtmlxG … 7861090000