From: <ou...@us...> - 2007-01-04 17:47:43
|
Revision: 11134 http://svn.sourceforge.net/jvcl/?rev=11134&view=rev Author: outchy Date: 2007-01-04 09:47:41 -0800 (Thu, 04 Jan 2007) Log Message: ----------- Mantis 3411 TJvDBGrid Feature Idea "AllowDelete" Modified Paths: -------------- trunk/jvcl/run/JvDBGrid.pas Modified: trunk/jvcl/run/JvDBGrid.pas =================================================================== --- trunk/jvcl/run/JvDBGrid.pas 2007-01-04 17:37:35 UTC (rev 11133) +++ trunk/jvcl/run/JvDBGrid.pas 2007-01-04 17:47:41 UTC (rev 11134) @@ -275,6 +275,7 @@ FRowResize: Boolean; FRowsHeight: Integer; FTitleRowHeight: Integer; + FCanDelete: Boolean; procedure SetAutoSizeRows(Value: Boolean); procedure SetRowResize(Value: Boolean); procedure SetRowsHeight(Value: Integer); @@ -501,6 +502,8 @@ default JvGridResizeProportionally; property SelectColumnsDialogStrings: TJvSelectDialogColumnStrings read FSelectColumnsDialogStrings write SetSelectColumnsDialogStrings; + { Allows user to delete things using the "del" key } + property CanDelete: Boolean read FCanDelete write FCanDelete default True; { EditControls: list of controls used to edit data } property EditControls: TJvDBGridControls read FControls write SetControls; @@ -952,6 +955,7 @@ FRowsHeight := DefaultRowHeight; FTitleRowHeight := RowHeights[0]; FShowMemos := True; + FCanDelete := True; end; destructor TJvDBGrid.Destroy; @@ -1377,7 +1381,7 @@ Exit; end; VK_DELETE: - if not ReadOnly and CanModify and not + if CanDelete and not ReadOnly and CanModify and not IsDataSetEmpty(DataLink.DataSet) then begin if DeletePrompt then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |