Aggregate non neumeric column values on filter

Hi,

I have attached combo and select box to my header in the grid. Now based on selected values of combo or select box,I want to aggregate one column values. But Column values are not any numeric value. The values represents month(m),week(w),days(d). for example 2 weeks 3 day is 2w3d. That’s why I cant use #stat_total.

Now based on my filter these values in one column needs to be aggregated with some logic and sum needs to be displayed on header cell dynamically.

Could you please help me with this.

Thanks in advance,
Swati Sharda

You can use “onFilterStart” event to catch when filtering is started and then call filterBy() method to filter grid by custom rule. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … iltering&s[]=filterby
docs.dhtmlx.com/doku.php?id=dhtm … filterby&s[]=filterby

Hi Olga,
I have been reading about these methods, but could not understand much.this is my code in .js

function buildGrid() { mygrid.gN=true; mygrid.imgURL ="image-url"; mygrid.setHeader("Key,Rank,Summary,Components,Status,Reporter, OE, RE, BV,SP,Project"); mygrid.attachHeader("#text_filter, ,#text_filter,#text_filter,#combo_filter,#combo_filter, , ,#stat_total,#stat_total,#combo_filter"); mygrid.setInitWidthsP("10,8,18,10,10,10,7,7,5,5,10"); mygrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left"); mygrid.setColTypes("tree,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro"); mygrid.setColSorting("str,str,str,str,str,str,str,str,int,int,str"); mygrid.setSkin(activeTheme); mygrid.enableAutoHeight(true); mygrid.enableSmartXMLParsing(true); mygrid.setEditable("false"); mygrid.loadXML(xmlPath); mygrid.enableBlockSelection(); mygrid.enableColumnMove(true); mygrid.enableColumnAutoSize(true); mygrid.enableMultiline(true); mygrid.enableHeaderMenu(); mygrid.init(); }

Now I want to aggregate header “RE” highlighted in screenshot. These values are not numeric.

Thanks,
Swati Sharda