Context: TStringGrid sorted on a column.
UseCase:
1. Add a row
2. Initialize Cell[SortedColumn,RowCount-1] to some value V.
3. Call Cols[SortedColumn].IndexOf(V)
TStringGrid's Behavior:
1 => Appends a row to the bottom of the grid.
2 => Assigns the value to the cell
3 => Performs a binary search against the sort order of the column as it was before the new row was added. As a result, IndexOf might return -1 if the binary search misses V.
I don't have any issue with this behavior, but wanted to confirm that's what will happen in such a use case.