Welcome Guest Search | Active Topics | Sign In | Register

Grid: reorder Columns: clientside-event Options
blob
Posted: Thursday, December 9, 2010 3:09:31 AM
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.
eo_support
Posted: Thursday, December 9, 2010 8:46:58 AM
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!
blob
Posted: Friday, December 10, 2010 7:14:46 AM
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.
eo_support
Posted: Friday, December 10, 2010 3:33:45 PM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.