grid with combo problems


I have a grid setup with several combo columns e.g.
zzgrid.getCombo(2).put(0, “Stop”);
zzgrid.getCombo(2).put(1, “Behandeling”);
zzgrid.getCombo(2).put(2, “Begeleiding”);

zzgrid.getCombo(3).put(0, 0);
zzgrid.getCombo(3).put(1, 1);
zzgrid.getCombo(3).put(2, 2);
zzgrid.getCombo(3).put(3, 3);
zzgrid.getCombo(3).put(4, 4);

If I change column 3 to value 4 and I want to get the value of column 2 of the selected row by using
var iStatus = zzgrid.cells(zzgrid.getSelectedId(),2).getValue();

I get the description text instead of the value. Is this a known problem?

You can get text of the combo with getText() method. Note, column indexes in grid is zero-based

Hi Olga,

Thanks for jumping in.
My problem is that the code as shown sometimes retuns an integer value (e.g. “0”) or sometimes returns a string label(e.g. “Stop”) into variable iStatus. This is reproducible and depends on the column being edited. I can provide you with a test url if you want to test yourself. Send me a private e-mail and I will supply you with details.