This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

Issue/problem : it always adds the elemen at the end

Issue/problem : it always adds the elemen at the end

Hello,

I would like to have a grid with group and allow the user to change the order of row in a group.
This post seems to answer to my need, but it does not work correctly for me. Actually, when I drag and drop a row, the row is always put at the end (of the sub-group). It is as if the operation = "append" (and not "insert"). But I force and log, and it seems to be "insert" feedback.

I noticed that executing this kind of code : store.insert(source, insertIndex); => fires the event Add. So, I am supposing that the element is always "add" instead of "insert".

I am using GWT 2.4.0 and GXT 2.2.4.

My need is quite basic : drag and drop row in the grip with group (note: the feature that forbides moving element in another group is fine).
My issue is : the dragged row is always "append" instead of "insert" at the position.

I have a look to this post, and I understand why I have the feeling of "appending the row at the end". It is due to the store.sort().
I explicitly add store.sort("myPersonnalColumnOrder", SortDir.ASC); => now the row is correctly sorted (and no visual effect of "append" at the end, anymore).