After doing a move
INSTANCE.igGridColumnMoving.moveColumn( sortArray[a], a );
the columnSorting event has the old text for ui.columnKey ? Its like this was not updated? Interestingly, alerting the key during the mode shows it was updated.
example
[1][2][3][4]
click the first column and ui.columnKey is 1
now move column 2 to the first position
[2][1][3][4]
why?
Hello Sean,
The ui.columnKey property is not mutable i.e. it will never change during the lifetime of the grid, because that's the key of the column. In your example you use numbers to describe the problem, but they are still keys.
Usually column related events have 2 properties ui.columnKey and ui.columnIndex (which I think is what you're looking for). Unfortunately in this event the ui.columnIndex is not available. We will investigate the reasons behind this and probably will log a bug to add it to the event.
In order to overcome the lack of ui.columnIndex property you can use the following code to get the actual column index by column key:$("#grid1_ProductID").data("columnIndex");
where "grid1" is the id of the grid, and ProductID is the key of the column which you take from ui.columnKey property of the columnSorting event.
Hope this helps,Martin PavlovInfragistics, Inc.
I no longer need a fix here, but I still feel its a bug.