dhtmlxTreeGrid: +/- icons disappear when using select filter

Hi there,



the issue described below applies for both FF 3.0.5 as well as IE6.



Initially I add rows to the grid via:



mygrid.load(initURL+"&salt="+(new Date().valueOf()),calcFooterValues);



Response from server looks like this:









AAA





BBB





CCC







Furthermore, I am using dynamic node loading via “mygrid.kidsXmlFile”.

I also use filtering via “mygrid.attachHeader(”#select_filter…)"



When I filter the grid using the select_filter, the ‘+’ icon next to the folder image disappears (replaced by ‘blank.gif’).

When I reset the filter (select blank option), the ‘+’ icon for the former selected value is still missing.



HOWEVER:

When I expand a row (and load new data via ‘kidsXmlFile’) and collapse it BEFORE using the filter,

the ‘+’ icon is still visible when using the filter.

This behaviour remains the same as long as I do not reload the grid.



ALSO:

After resetting the filter, I am still able to dynamically add rows to the grid, even when the parent row lost its ‘+’ icon!!

Firebug tells me that instead of ‘plus.gif’, I click on ‘blank.gif’ which calls the server via ‘kidsXmlFile’,

adds new rows to the grid and replaces ‘blank.gif’ with ‘minus.gif’.



If I then filter this row via ‘select_filter’, the behaviour is as expected: the ‘-’ icon is show.

If I first collapse the row and then filter it, the ‘+’ icon is correctly shown.



Thanks for all your help!

Problem confirmed, while logic of grid works correctly the image not reset back correctly after filtering.
We currently working on solution - most probably workaround will be sent by email on Monday.

Any updates on the matter…?

Sorry for delay.
Fixed js file sent by email, please try to use it instead of original one.

Hi Support,

it only works partly now.
I will try to explain what happens in the various scenarios I tested:

TreeGrid Setup:

JS: Filtration Level is set to 0:   treeGrid.setFiltrationLevel(0);
XML: All rows initally loaded are configured as follows:





//…
So they all have “kids” and one of the “plus(2|3).gif” icons before the folder icon.

Scenario 1: select filter --> reset filter

Treegrid is loaded and initial rows added to it (see above)
but no additional data being loaded yet (e.g. I have not yet clicked on a “plus” icon to request kids of the row)

When I use a select filter, the “plus” icon disappears (the folder is still shown) - bad.
When I reset the filter (click on “blank” line in filter select box), all rows are shown and all “plus” icons are shown - fine.

Scenario 2: expand row --> select filter --> collapse row --> reset filter

I first click on a “plus” icon and “child” rows are correctly appended to the “parent” row.
When I use the select filter and select the row that now has “child” rows appended to it, it looks fine:
The parent row shows the “minus” icon, and the child rows are correctly shown - fine.

If I then collapse the child rows (e.g. click on the parent’s minus icon), they disappear and the “plus” gif is shown - fine.
If I reset the filter however, the formerly selected parent row is now expanded again and all child rows are shown - bad.
If I collapse it again and select it again in the select filter, the “plus” icon is correctly shown - fine.
Obviously, this is always the case: if a parent row has been expanded / collapsed and then selected in the filter, the “plus” icon is correctly shown.

Scenario 3: expand row --> collapse row --> select filter --> expand row --> reset filter

If I first expand a row, then collapse it and then select it in the filter (as mentioned above), the “plus” icon is correctly shown - fine.
If I then expand it and reset the filter, it is now collapsed and the parent’s “plus” icon is shown - bad.

Hope this helps you to find a solution.
Mort

One more update send by email. It fixes most of above points.

I have the same problem now, after filtering twice, some plus/minus icons are not shown anymore. I have version dhtmlxSuite_v26_PRO_100722

If issue still occurs - send any kind of demo where problem can be reconstructed to the support@dhtmlx.com