Categories | Question details Back To List | ||
Epmty filter options #combo_filter Hello, i want to use combo filter in header of my grid. When I load data from XML it works ok, but when I load data in javascript my combo filter is empty (has no options). Here is example of my code: dhx_globalImgPath="../../../dhtmlxCombo/codebase/imgs/"; mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("../../codebase/imgs/"); mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Date of Publication,Shipping,Bestseller"); mygrid.attachHeader(" ,#combo_filter,#combo_filter, ,#cspan,#cspan,#cspan,#cspan"); mygrid.setInitWidths("50,150,120,80,80,80,80,200") mygrid.setColAlign("right,left,left,right,center,left,center,center") mygrid.setColTypes("ed,ed,ed,price,ch,ro,ro,ro"); mygrid.setColSorting("int,str,str,int,str,str,str,date") mygrid.init(); mygrid.enableSmartRendering(true); mygrid.setSkin("light") //mygrid.loadXML("500.xml"); //This works fine for (i = 0; i<10; i++){ rowData = new Array(); rowData[0] = 'test '+i; rowData[1] = 'test '+i; rowData[2] = 'test '+i; rowData[3] = 'test '+i; rowData[4] = 'test '+i; rowData[5] = 'test '+i; mygrid.addRow(i, rowData); } Is it posible to work with filter when data are loaded in JS or I can use it only when load from XML? Thank you Jan Answer posted by dhxSupport on Sep 07, 2009 03:05 >>Is it posible to work with filter when data are loaded in JS or I can use it only when load from XML After adding new row in the grid you should refresh filters: mygrid.refreshFilters(); |