plus methods to tstringgrid lazarus / 7-LCL ---------------------------------------------------------------------- rodrigo · 2005-10-25 13:14 its methods will help more: hidecol(const index:integer); {hide column of grid} hiderow(const index:integer); {hide row of grid} sortbycolumn(const column:integer;const typeofdata; const ascend/desc);{sort by column} ---------------------------------------------------------------------- jesusr · 2005-10-25 20:18 requested functionality can be done with following  changes: Code: [Select]   //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: Code: [Select] .... begin   result := FunctionToCompareTwoStrings(grid.Cells[aCol,aRow], grid.Cells[bCol,bRow])  // the function should return  <0 if CellA0 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 Code: [Select]   //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