requested functionality can be done with following changes:
//to hide columns
//grid.HideCol(3);
grid.ColWidths[3] := 0;
//to hide rows
//grid.HideRow(3);
grid.RowHeights[3]:=0;
for SortByColumn(?, ?, ?) write an OnCompareCells for grid and in handler write something like:
....
begin
result := FunctionToCompareTwoStrings(grid.Cells[aCol,aRow], grid.Cells[bCol,bRow])
// the function should return <0 if CellA<CellB >0 if CellA>CellB
// and 0 if CellA=CellB
// for example to simply compare strings use:
// result := CompareText(grid.Cells[aCol,aRow], grid.Cells[bCol,bRow]);
// this will sort ascending, to sort descending simply invert compare
// expresion or multiply by -1 the result
end;
then you can replace
//SortByColumn(3, ?, ?);
grid.SortColRow(True {so is a column}, 3);
Maybe it could be useful to write SortColRow(bool, index, param) so OnCompareCells include a param which could be used for example to
select descending or ascending or any other purpose, in this case
grid.SortColRow(True, 3, Integer(true)); for ascending
grid.SortColRow(True, 3, Integer(false)); for descending and OnCompareCells: if Boolean(Param) then .... else .....;
if you feel like it could be useful fill a "request feature" report in bug tracker