Categories | Question details Back To List | ||
Text Filter using Groups I have a grid of about 1000 items that are Grouped by "Organization". I want to be able to use a text box and filter those organizations, but still maintain the groupings. The groups show up properly, but whenever I type something in the text box, everything disappears in the grid. Here is my code (I am using pro version): var flds = "Organization & Form Title, Org Hidden, Preview Form, Copy Form"; grid = new dhtmlXGridObject('gridboxSource'); grid.setImagePath("../../includes/dhtmlxGrid/imgs/"); grid.setHeader("Filter Organizations<input onclick='return !((arguments[0]||event).cancelBubble=true);' id='Organization' type='text' style='width:100%'>,#cspan,#cspan,#cspan"); grid.attachHeader(flds); grid.setInitWidths("250,200,70,70"); grid.setColAlign("left,left,center,center"); grid.setColTypes("ro,ro,link,link"); grid.init(); grid.customGroupFormat=function(text,count){ return text+" ("+count+")" }; grid.loadXMLString(document.getElementById('xml_string2').value,function(){ grid.makeFilter('Organization',1); grid.groupBy(1); }); grid.collapseAllGroups(); Answer posted by Support on Feb 21, 2008 08:59 In current version of grid filtering and grouping are mutual exclusive. Basically it possible to ungroup grid, call filterBy, and group grid back but performance of such order of action can be not good for medium and big datasets. |