We have dhtmlx v.26 pro.
We have an odd issue with getFilterElement() function. After moving columns programmaticaly with moveColumn() I first noticed that the filters were not moved with the them. I have fixed this my adding code that swaps the filters over when columns are moved. This all works correctly and I can see the correct filter on the correct column
However after this operation, calling getFilterElement() to the original filter of the index called.
The Grid originally has a Select Element on the first column (index 0). I move a new column and its filter to index 0 - this one has a Input element. However calling getFilterElement(0) returns the original Select filter?
I can posts some code but its a very complicated site. I just wanted to see if this was a known issue and if there are any fixes? I can’t see anything in the forums?
Please, try to update the version of your dhtmlxgrid.
You have kindly sent me an evaluation version of the latest version of the dhtmlxgrid and this issue remain.
To confirm it I added this code
alert("Moved column old index = " + cInd + " new index= " + posInd);
alert("Name of column at new index= " + mygrid.getHeaderCol(posInd));
alert("filter at new index is " + mygrid.getFilterElement(posInd));
On the grid we have a Input Element on the first column and a select element on the second column. The first column is called Name the second is Group
I move the second column to the front. We get from the alerts
Moved column old index 1 new index 0 - correct and as expected
Name of column at new index Group - again correct as Group is now the first column
filter at new index is [object HTMLInputElement] - this is incorrect. The filter at index 0 is a select element now.
I hope you can help as its not worth us upgrading of this doesn’t fix this issue.
I’m having this issue too. Namely, after I move columns, getFilterElement returns the filter element by index as if the columns hadn’t been moved. Any development on this or workarounds known?
The issue is confirmed and fixed.
Please, open ticket at support.dhtmlx.com so we can provide you with a fix.