Loading the combo is very slow

I am using the following code to generate the rows of a table.

function addRowToTable()

{

        var tbl = document.getElementById(‘entrydetails’);

        var lastRow = tbl.rows.length;

        var iteration = lastRow;

        var row = tbl.insertRow(lastRow-1);

        var row1 = tbl.insertRow(lastRow-1);

        var cellLeft = row.insertCell(0);



        var cellRight = row.insertCell(0);

        var text71 = document.createElement(‘image’);

        text71.setAttribute(‘src’, ‘/images/view.gif’);

        text71.onclick =Function(“showItem(” + count + “,”+ lineNo + “);”);// new Function(“showItem();”);

        text71.type=“image”;

        text71.alt=‘Show Details’;

        text71.name=“ch_lineItemSrno”+count;

        text71.id=“ch_lineItemSrno”+count;

        cellRight.appendChild(text71);

        cellRight.align=“center”;

        cellRight.className=“cellbgml”;

        lineNo++;



         var cellRight = row.insertCell(1);

        var e1 = document.createElement(‘select’);

         var string = new Array();

        string.push("

");

        string.push("<option value="+" “+”>"+"");

         for(var i=0; i<itemNoList.length;i++){

            //var ls_idName = getName(itemCodes[i]);

            string.push(""+itemNoList[i]+"");

            

        }

        string.push(’
’);

        var writestring = string.join(’’);

        e1.style.width = “260px”;

        cellRight.style.width=“175px”;

        cellRight.innerHTML = writestring;

        cellRight.align=“center”;

        cellRight.className=“cellbgml”;

        zepItemNo[count]=dhtmlXComboFromSelect(“ch_lineItemNo”+count);

        zepItemNo[count].enableFilteringMode(true);

        zepItemNo[count].setOptionWidth(400);

        rowno++;

        count = parseInt(count) + 1;

}



Here “itemNoList” contains 20000 elements.So its taking more time to generate each row.Here I have to crate n number of rows.Please Assist .

Thanks


Hello,


you can use dynamic loading in this case: combo.enableFilteringMode(true,path_to_script,true). The sample is


dhtmlxCombo/samples/filtering/100000/index.html


dhtmlx.com/docs/products/dhtmlxC … index.html