Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by josheph on Mar 03, 2009 11:22
open dhtmlx forum
dhtmlx grid

we are using Pro version.

We are displaying grid using xml sent from server side. We need to let the user edit the grid. i got 2 questions
1. Is it possible to use ajax on just one specific cell and provide some sort of auto complete, is there any samples
2. we want to disable or make is read only specific cells, how do we that from XML. we don't want to call read only on each cell after loading the cell.
Answer posted by dhxSupport on Mar 05, 2009 01:52

1. You can use dhtmlxDataProcessor. Please see example here http://dhtmlx.com/docs/products/dhtmlxGrid/samples/dataprocessor/savedata_grid.html?un=1236160238000

http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Dataprocesor_usage.html#grid_art_dataprocessor

2. You can set "ro" excell type for the whole column or for the specific cell:

<column type="ro" width="150" > Column Name </column>

or <cell type="ro">Cell's value</cell>

Also you can run commands from XML:

  <afterInit>  
  <call command="lockRow">  
  <param>2</param> 

  <param>true</param>
  </call> 
  </afterInit>

Please see example here http://dhtmlx.com/docs/products/dhtmlxGrid/samples/initialization_loading/pro_config_ext.html

Answer posted by josheph on Mar 04, 2009 11:50
Thanks for the reply. The sample is basically getting data and displaying from server php. What we need is when displaying data we use XMLtoString() and pass XML to load initial grid. In this grid some of the cells needs to be Ajax look ups. Is there any way to do it.  Say i have 3 column, when user selects my 3rd column, 2rd row cell i want the cell to support ajax look up to get values from data ( the query to database should have vaues from 2rd row, first column) and display a combo box.  do you have any working samples or idea how to accomplish it with dhtmlgrid.
Answer posted by dhxSupport on Mar 05, 2009 01:52

You can use "combo" excel type which has autocomplete functionality

Please see example here http://dhtmlx.com/docs/products/dhtmlxGrid/samples/interaction_other_components/pro_combo.html?un=1236243895000

On this sample first and 3rd colums are working on autocomplete mode.

More information you can find here

http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Combo_excell.html#grid_art_comboexcell

http://dhtmlx.com/docs/products/dhtmlxGrid/doc/new_1_3.html#grid_intcombo

Answer posted by josheph on Mar 05, 2009 16:06
Thanks. How do we pass additinal parameters to autoSerarch. we got "\SerachServlet?param1=test" as source. i want to pass additional parameters to that source from grid other columns for performing a search. Is there any way to it.
Answer posted by Support on Mar 09, 2009 04:58
You can access the combo object as 
    var combo = grid.getColumnCombo(index); // index - column index
and use 
    combo.setFilteringParam(name,value);
to add additional parameters

( the best way to exec such code is onEditCell event, stage 0 or 1 - exactly before combo cell switched to edit state )