I’m trying to dynamically detach/attach inline filter header in my code. Filters are not working properly after that. Does DHTMLX provide this support?
Unfortunately this is the expected behavior.
Filter is attached to the html element of the header. so detaching the header you will lose the original html of the filter.
you need to clear (destruct) the filters:
mygrid.filters = ;
after detaching the header. so you are able to create new for the hew header.
Thanks for your reply.
I’ve tried clearing/destructing the filters. Still only the filtered rows of grid are considered for further filtering. I don’t have any option than reloading the page.
Please, make sure that you’ve unfiltered your grid data be fore the filters removing:
mygrid.filterBy(0,""); //unfilters the grid
mygrid._f_rowsBuffer = null; //clears the cache
I have followed the mentioned step but still unable to get rid of ‘select_filter’. It worked for ‘text_filter’.
Please, try to use:
myGrid.detachHeader(n) //n -header row index myGrid.filterBy(0,"") myGrid._f_rowsBuffer = null; myGrid.filters=; myGrid.attachHeader(header_row_content) myGrid.setSizes()