Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 04, 2008 13:15
open dhtmlx forum
cell editor

Hello,

I have a grid with column type of ed. When I click on the cell I want following editor to showup instead of the default editor.

<div>
<label>Enter Number</label>
<input type="text" maxlength="2" size="3" id="NumberIn"/>
<label >Description:</label>
<textarea id="description" rows="4" cols="17"></textarea>
</div>

The value of "NumberIn" should go in the current cell which is open for edit and value of "description" field should go in the next cell.

Can you please help me.

Thank you.

Answer posted by Support on Dec 05, 2008 02:19

Theree two ways to achieve necessary behavior

a) create a custom excell, which will use your custom editor instead of existing one
http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Custom_excell_creation.html#grid_cexc

b) use "ro" type instead of ed, and attach your custom edtitor through selection event
grid.attachEvent("onRowSelection",function(id,ind){
   if (ind == INDEX ){
          show_custom_area();
          custom_area.number.value = grid.cells(id,index).getValue();
          custom_area.number.descr = grid.cells(id,index+1).getValue();
   }
})

where INDEX - index of column in question.