jeudi 9 janvier 2020

Restrict where TStringGrid rows can be moved to

I have a TStringGrid with goRowMoving enabled in Options and one fixed row.

I want the last row to always remain at the end of the grid (ie don't allow the user to move the last row to a different position or allow any other row to be moved to after the last row).

What is the best way to achieve this? I could check the source row and the destination row after the row has been moved in the OnRowMoved event and move it back if applicable, but this doesn't seem like a very elegant solution.

Aucun commentaire:

Enregistrer un commentaire