Categories | Question details Back To List | ||
getting data twice in combo 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 data twice within the combo.. 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 twice 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 06, 2008 02:25 You form incorrect XML data, it must contain the value for the "co" column not the label In case of your init code combo_addressTypeCd.put('PERMANENT','Permanent'); the correct XML will look as <rows> <row id="some" addressTypeCd="PERMANENT" ... /> |