Categories | Question details Back To List | ||||||||
height of #combo_filter in grid header I am trying to use the #combo_filter feature in a grid. It seems that it always displays a drop-down area of 6 lines even if there are less values - it shows blank lines and if you select a blank line all records are filtered out. Is there a way to make the #combo_filter auto adjust the number of lines in the drop down based on the data? mygrid = new dhtmlXGridObject('mygrid_container'); mygrid.setImagePath("codebase/imgs/"); mygrid.setHeader("Order No,Date,Status,PO No,Salesman,Total Price"); mygrid.attachHeader("#text_filter,#text_filter,#text_filter,#text_filter,#combo_filter,#numeric_filter"); //mygrid.attachFooter("#cspan,#cspan,#cspan,#cspan,Total,${#stat_total}"); mygrid.attachFooter("-,-,-,-,Total,${#stat_total}"); mygrid.setInitWidths("*,*,60,*,80,*"); mygrid.setColAlign("left,left,center,left,center,right"); mygrid.setSkin("light"); mygrid.setColSorting("str,date,str,str,str,int"); mygrid.setColTypes("ro,ro,ro,ro,ro,price"); mygrid.attachEvent("onRowSelect",doOnRowSelected); mygrid.init(); Thanks. Answer posted by Support on Nov 10, 2008 02:22 dhtmlxCombo allows to set automatic height. So, in order to enable it for the combo filter, you can add the following call in the dhtmlxgrid_filter.js (line 168): ... var z=new dhtmlXCombo(id,"_filter","90%"); z.enableOptionAutoHeight(1) /*can be added*/ ... dhtmlxcombo_whp.js extension has to be included in this case. Answer posted by Tim Sanders on Nov 10, 2008 06:43 When I open dhtmlxgrid_filter.js in a text editor there are only a few long lines. Since your instructions are to edit line 168 I'm not sure where this is in the file. Can you give me the surrounding text to search for or tell me how to open the file so that the lines will match your instructions? Thanks. Answer posted by Support on Nov 10, 2008 09:54 The source folder of package contains the same js files in not-compressed state. Attachments (1)
|