I have a grid with 2 bitmap columns that the user can use to move the row up and down within the grid. I know that gridcontrol.MoveCurrentRow(Direction) should accomplish this but I cannot get it to work.
I have made sure that the other rows, etc. have CanBeCurrent set to true. Is there anything I am missing? here is my code
First, MoveCurrentRow refers to the CurrentRow property, which means the row that is currently selected. If you change the CurrentRow property, it is the row that is currently selected that changes. The MoveCurrentRow method is in fact changing the CurrentRow property. It is not a way to move a specific row around the gird.
Second, it is not possible to change the position of a row within the DataRows collection. You need to use a workaround to do this. Basically, you need to have an invisible column which is in fact an index of the rows on which you sort the grid. Then you simply change the index of a row, and resort the grid.