Categories | Question details Back To List | ||||||||
BUG in #select_filter when including connector.js Hi, I am facing a very problematic bug. I own a Enterprise licence version : dhtmlxSuite_2009Rel1_pro_90226 #select_filter (local) don't work anymore when using connector component in page. To reproduce the bug, it's very easy. Use you sample : dhtmlxTreeGrid/samples/grid_operations/treegrid_filtering.html Add the line : <script src="../../../dhtmlxConnector/codebase/connector.js"></script>, in head section, after including all other JS. Refresh Now, your #select_filter are all empty ! Please, could you help, it's VERY URGENT. Regards Answer posted by dhxSupport on May 11, 2009 05:37 #select_filter filter is a fully client side. This filter will not correctly in case of dynamic loading. #select_filter cannot filter rows which wasn't loaded in the client side yet. If you are using dhtmlxConnector to populate your grid you can use #connector_select_filter. Please see more information about filtering in grid populated with dhtmlxConnector here http://dhtmlx.com/docs/products/dhtmlxConnector/doc/guide.html#cc_guide Answer posted by Olivier on May 11, 2009 06:43 Sorry, your answer is not clear. - First, could you tell me why, if i include the "connector.js" in the very classical sample i gave in my question, "#select_filter" don't work anymore. Understand, i didn't touch any other line of code in the sample. I think it's not normal. - Second, in my real code, i user processor and connector. Why do you say "#select_filter cannot filter rows which wasn't loaded in the client side yet." ? In fact, i use connector to load full dataset (not dynamical loading). So all the result is loaded with the "loadXML" that point to a php page, as in you connector samples. So data is loaded and available to be filtered on the client side. I don't want server side filtering. I test the "#connector_select_filter", and menu keep empty on the headers. Answer posted by Olivier on May 11, 2009 06:50 To give more complement, here is the code i use. I am in a Layout frame. The result is perfect, but the select filter menu in headers keeps empty. No error with firebug. mygrid = dhxLayout.cells("c").attachGrid(); mygrid.selMultiRows = true; mygrid.imgURL = "js/dhtmlxGrid/codebase/imgs/"; mygrid.setHeader("RG1,RG2,RG3"); mygrid.setInitWidths("100,100,100") mygrid.setColAlign("left,left,left") mygrid.setColTypes("ed,ed,ed"); mygrid.setColSorting("str,str,str"); mygrid.enableDragAndDrop(true); mygrid.enableMultiselect(true); mygrid.attachHeader("#connector_select_filter,#connector_select_filter,#connector_select_filter"); mygrid.setSkin("light"); mygrid.init(); mygrid.loadXML("datas.php"); // copied from your 01_basic_connector.php sample to connect to my database, and table format. var dp = new dataProcessor("datas.php"); dp.setTransactionMode("POST",true); dp.setUpdateMode('cell',true); dp.init(mygrid); Answer posted by Support on May 11, 2009 09:10 Conflict between #select_filter and connector.js confirmed and fixed, please use attached js file instead of original one. ( with it #select_filter will be correctly filled with values ) Attachments (1)
Answer posted by Support on May 11, 2009 09:14 >>Why do you say "#select_filter cannot filter rows which wasn't loaded in the client side yet." ? That was related to the dyn. srnd mode. Normally #select_filter can be used in plain loading mode or static srnd loading mode, when all data available on client side. If you are using dyn. smart-rendering mode, when data loaded by chunks - client side filtering can't be used, because there is no enough info to process all rows ( the problem symptom is very similar to the one caused by connector.js conflict - empty select box ) Answer posted by Olivier on May 11, 2009 09:54 Great, i confirm your fix is working for the conflict with connector.js Thanks for your fast actions ! Best regards. |