Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by andreea on Aug 05, 2008 04:58
open dhtmlx forum
Is it possible to display a diffrent value in combo , than the one selected?

Let's say i have these values in the combo (of a grid) :

Ana
Maria
Veronica
Lucretia

..and I select Maria. Is it possible for the cell to display "M",after the selection is made?
Answer posted by Support on Aug 05, 2008 08:01
Technically it can be done by modification of setValue method of related excell. 
dhtmlxgridcell.js , line 1048 
eXcell_co.prototype.setValue=function(val){
...
this.setCValue((this.cell._combo||this.grid.getCombo(this.cell._cellIndex)).get(val)||val, val);

can be changed as

this.setCValue(((this.cell._combo||this.grid.getCombo(this.cell._cellIndex)).get(val)||val).substr(0,1), val);