summaryrefslogtreecommitdiff
path: root/src/gui/fpg_grid.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/fpg_grid.pas')
-rw-r--r--src/gui/fpg_grid.pas15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/fpg_grid.pas b/src/gui/fpg_grid.pas
index 72fd29bf..3eecf7c1 100644
--- a/src/gui/fpg_grid.pas
+++ b/src/gui/fpg_grid.pas
@@ -106,6 +106,7 @@ type
constructor Create(AOwner: TComponent); override;
function AddColumn(ATitle: string; AWidth: integer; AAlignment: TAlignment = taLeftJustify;
AbackgroundColor: TfpgColor = clDefault; ATextColor: TfpgColor = clDefault): TfpgStringColumn; overload;
+ procedure DeleteRow(AIndex: integer); override;
property Cells[ACol, ARow: Integer]: string read GetCell write SetCell;
property Objects[ACol, ARow: Integer]: TObject read GetObjects write SetObjects;
property ColumnTitle[ACol: Integer]: string read GetColumnTitle write SetColumnTitle;
@@ -513,5 +514,19 @@ begin
Updated; // if we called .BeginUpdate then don't clear csUpdating here
end;
+procedure TfpgCustomStringGrid.DeleteRow(AIndex: integer);
+var
+ c: integer;
+begin
+ inherited DeleteRow(AIndex); // does sanity checks
+ for c := 0 to FColumns.Count-1 do
+ begin
+ TfpgStringColumn(FColumns[c]).Cells.Delete(AIndex);
+ end;
+ FRowCount := FRowCount-1;
+ if HasHandle then
+ Update;
+end;
+
end.