Hi,
I'm trying to create a table in which the user can select a number of rows, which may not be contiguous, and then move them up/down the table by clicking on an up or down button.
I'm using TStringGrid for this, and the problem I'm having is that I can't find any way to modify the selections after the move, so the items that were selected before continue being selected, in case the user wants to keep clicking on the button to move the items further.
I'm implementing this functionality by iterating through
and within this, through the range of rows and then calling
GrdExecTable.ExchangeColRow(False,j-1,j)
for example, to move the contents of row "j" up.
My grid options are
[goFixedVertLine,goFixedHorzLine,goVertLine,goHorzLine,goRangeSelect,goRowSelect,goSmoothScroll,goFixedColSizing,goCellEllipsis]
I thought that maybe repeatedly setting
would allow me to re-create the multiple selection ranges, but a new value overwrites the previous one.
Am I missing something, or there really is no provision to re-create these selections from code? Seems odd to me.
Thanks.