Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Cido on Feb 16, 2009 05:20
open dhtmlx forum
Grid with 5 Combobox Slowly to Init

Hi guys,
I've a grid with 5 combo, it's very slowly to init the grid.

Here is my code, can you help me?

     gddesc = new dhtmlXGridObject('gbdesc');
     gddesc.selMultiRows = false;
     gddesc.imgURL = "TreeGrid/codebase/imgs/";
     gddesc.setHeader("País,Anunciante,Meio,Veículo,Tipo de Anuncio,Ano,id_dis,id_cli");
     gddesc.setInitWidths("50,200,110,110,110,38,0,0");
     gddesc.setColAlign("left,left,left,left,left,right,right,right")
     gddesc.setColTypes("combo,combo,combo,combo,combo,edn,ro,ro");
     gddesc.setColSorting("str,str,str,str,str,str,str,str");
     gddesc.setColumnIds("pais,anun,meio,veic,tipoanun,ano,id_dis,id_cli");
     gddesc.setSkin("light");
     gddesc.init();

     cbPais = gddesc.getColumnCombo(0);
     cbPais.readonly(true);
     cbPais.loadXML("country.xml");

Answer posted by Alex (support) on Feb 17, 2009 08:59

Hi, 

If your combos are rather big, you can try to use autocomplete mode for them.

Please, have a look at the article:

http://dhtmlx.com/docs/products/dhtmlxCombo/doc/guide.html#combo_filtering

the sample is http://dhtmlx.com/docs/products/dhtmlxCombo/samples/filtering/combo_filter.html

Answer posted by Cido on Feb 17, 2009 09:33

Hi Alex,

The problem is not with the size of combos, it is before combobox loads. I already to separate the combobox load process from Init, and the delay is in the INIT process.

When I change the type of combobox to "co" instead of "combo" the init occours normaly.

Some idea? :-)

Thanks very much.

 

Answer posted by Support on Feb 18, 2009 10:00
During init grid creates empty combo objects for each column - but creating of 5 combo objects if pretty easy task , which must not require any significant time. 
After data loaded in grid, values will be converted to labels , which can take some time based on size of grid. 

How big dataset loaded and grid and count of options per combo?