Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by kunal on Nov 21, 2008 01:12
open dhtmlx forum
problem with dhtmlx combo box

Hello,

I am loading dhtmlx grid using Xml String (Format xmlB)...
In a grid I have used some columns of type 'CO'
ie. combo box ...
The data within the combo is added using put api..

The output is such that I am able to view the selected code type within the combo rather than its description.

Eg.
COMBO values are
combo_addressTypeCd.put('PERMANENT','Permanent');
combo_addressTypeCd.put('OFFICE','Office');
combo_addressTypeCd.put('CORRESPONDENCE','Correspondence');

selected cell value is PERMANENT

I am able to view PERMANENT in my combo dropdown

Please let me know how do I fix this issue.

The code is as below


<SCRIPT>
var xmlString=" ";
mygrid_partyAddr = new dhtmlXGridObject('partyAddr');
mygrid_partyAddr.setHeader("addressTypeCd,addressLine1,city,stateCd,preferredFl,guid,parentGuid,id,versionID,updatedDt,addressSeq,addressLine2,addressLine3,countryCd,zipCode,transactionUID,Del");
mygrid_partyAddr.setInitWidths("100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,30");
mygrid_partyAddr.setColTypes("co,ed,ed,co,co,ed,ed,ed,ed,ed,ed,ed,ed,co,ed,ed,ro");
mygrid_partyAddr.setColAlign("left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,center");
mygrid_partyAddr.setColumnIds("addressTypeCd,addressLine1,city,stateCd,preferredFl,guid,parentGuid,id,versionID,updatedDt,addressSeq,addressLine2,addressLine3,countryCd,zipCode,transactionUID,status");
mygrid_partyAddr.setColumnsVisibility("False,False,False,False,False,True,True,True,True,True,True,True,True,True,True,True,false");
mygrid_partyAddr.xml.top="List";
mygrid_partyAddr.xml.row="./PartyAddressDO";
mygrid_partyAddr.setSkin("light"); mygrid_partyAddr.init();

var combo_addressTypeCd=mygrid_partyAddr.getCombo(mygrid_partyAddr.getColIndexById('addressTypeCd'));
combo_addressTypeCd.put('PERMANENT','Permanent');
combo_addressTypeCd.put('OFFICE','Office');
combo_addressTypeCd.put('CORRESPONDENCE','Correspondence');
mygrid_partyAddr.parse(xmlString,'xmlB');
Answer posted by Support on Nov 21, 2008 02:20
There is no difference in the way how combo values treated for different XML formats
Please be sure that inside your datasource XML , you has not any unnecessary whitespaces around cell value (PERMANENT)