Dataprocessor and combo's in grid

Hi,

I use dataprocessor to save data from grid back to server which works fine exept when working with combo boxes in the grid. When dataprocessor posts the data back to a php file, the combobox fields contain the option texts instead of the option values.

Code used:

  grid.loadXML("webservice.php", function() {
     var dp =  new dataProcessor('project/proposal/process.php");
     dp.enableDataNames(true);
     dp.setUpdateMode('cell');
     dp.setTransactionMode('POST');
     dp.defineAction("error", errorHandler);
     dp.defineAction("insert",insertHandler);
     dp.defineAction("update",processHandler);
     dp.defineAction("delete",processHandler);
     dp.init(grid);
  });

Is there any easy solution to this?

Thanks,
Frank

DataProcessor sends the values for all cell types.
Problem can be in incorrect combo configuration, normally grid must load “values” from XML ( or other datasource ), and it is a common mistake to load text labels as data for combo column instead of values.

Stanislav,

“DataProcessor sends the values for all cell types.” doesn’t seem to be the case.

Loading of the grid as well as the combo’s via XML works fine and appears oke.
It’s the posting back via dataprocessor which contains the optiontexts instead of combo values.
In other means, what I see in the post back from dp is the same as combo.getComboText() instead of combo.getActualValue().

The combo is loaded via XML with the following data:

<?xml version="1.0" encoding="iso-8859-1"?> EUR USD YEN

Dp posts back for example ‘EUR’ instead of 2.

Which value you have in XML of grid for related cell.

Correct will be
2

but if you have
EUR

combo will check list of available options, will not find anyone with value=“EUR” and will create new option { value=“EUR”, label=“EUR” } to show data from incoming XML
If such row will be saved - it will send EUR to server side, because it never was correctly linked to options of combo.

Hi,

I have the same problem. In the latest pro version of dhtmlxGrid and dhtmlxDataprocessor when a combobox cell is updated it sends the cell value and not the option value to the server.

My xml to fill the grid:


19%

19% 6% ...

When the Dataprocessor sends data to the server to update the row it sends, for instance, 6% and not 11.

It actually updates correctly when I change the value of the combo but not when I edit another cell in the same row…

Try to change format of “combo” cell initialization like the following:

[code]19%19%

6% [/code]