|
Rank: Newbie Groups: Member
Joined: 11/30/2010 Posts: 6
|
Hi,
i have a (clientside)grid with "AllowColumnReorder" set to true. In one case i have a column with an order-id and an other column with its describtion. Now i need a clientside-event, fired when order-id column has its position changed(or even any column).
In this event i want to move the column with the describtion of this order-id right behind the "order-id" column.
This is my problem. I know there is no "ClientSideAfterReorder"-event. But maybe you have a solution, or even a hint how to do this.
Thanks a lot, with kind regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There is no easy way to do that. You may want to put the ID and description in "fixed columns". Fixed columns are always on the left side of the Grid and they can not be reordered. Another way is to use a timer to keep calling each column's getIndex() and getOriginalIndex(). getIndex returns the "moved" index, getOriginalIndex returns a columns' original index before any column was moved. Using this two methods you should be able to find out which column has been moved.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/30/2010 Posts: 6
|
Unfortunately fixed columns are not allowed and the timer is not a solution in this case.
I added a menu-item to set the right order for those columns if the user wish it. This solution is good enought for the moment. And now: Hope for a "ClientSideAfterReorder" event in one of the next builds. :)
Thanks for your work, with kind regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Yes. A ClientSideAfterReorder does make sense and would be the best solution for this scenario.
Thanks!
|
|