ComboBox in Grid - getComboText returning empty string

Hi.



I have a grid and want to populate combos when the user types into them. I am able to return a combobox object, however when I use the the getComboText, it is not showing the text I have typed into the combobox. I have included some code snippet to demo what I am doing. I hope it helps. Please let me know if you have any additional questions.







function doInit(){

parentGrid.setHeader(“COMMITMENT_PK,Type,Number,Title,VENDOR_FK,AMOUNT,STATUS_DOM,JOAN_FK,PROGRAM_AMENDMENT_FK,IS_DELETED,AGENDA_ITEM_ID_FK,FEG_FK,IS_UNION_REQUIRED,PUBLIC_WORKS_NUMBER,CREATED_BY,CREATED_DATE,LAST_UPDATED_BY,LAST_UPDATED_DATE”); parentGrid.setInitWidths(“0,150,75,200,100,100,100,100,100,100,100,100,100,100,100,100,100,100”);

parentGrid.setColAlign(“left,left,left,left,left,right,left,left,left,left,left,left,left,left,left,left,left,left”);

        parentGrid.setColumnsVisibility(“true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false”);

parentGrid.setColTypes(“ro,combo,ed,ed,combo,price,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed”);

parentGrid.init();

parentGrid.parse(cfGridXML,“xml”);

parentGrid.selectRow(0, false, false, true);



comboVendor = parentGrid.getColumnCombo(4); //commitment vendor

comboVendor.attachEvent(“onKeyPressed”,checkVendorList);





}



    function checkVendorList(){

        var vendorCombo = parentGrid.cells(parentGrid.getSelectedRowId(),4).getCellCombo();

        alert(vendorCombo.getComboText());

    }







Thank you in Advance for your help.



BTW: We are loving the product so far!!

To get text which user was types at the combo box better to use “onEditCell” event:
mygrid.attachEvent(“onEditCell”,function(stage,rowId,cellIndex,newValue,oldValue){
if (stage==2){
if (cellIndex==0){
var combo=mygrid.cells(rowId,cellIndex).getCellCombo()
var text=combo.getComboText();
alert(text);
}
return true;
}
return true;
})

Well, I am hoping to create Auto Suggest functionality. So, as the user types into the field, I would like to populate options from an ajax call. Using OnEditCell doesn’t allow me to check for OnKeyPressed. When I add the OnKeyPressed event to the Combo, I am able to get the combo object for the cell. So, I can see the getComboText() function. However, when I call it it returns blank text.


Hello,


autocomplete functionality is already implemented for dhtmlxCombo. So, you don’t need to create it: dhtmlx.com/docs/products/kb/inde … al&q=10764