[Lazarus] TDbGrid almost read-only ? :-)

Luca Olivetti luca at wetron.es
Wed Jul 14 08:56:42 CEST 2010


En/na Bogusław Brandys ha escrit:

> Solutions were given to me  by a user from IRC channel :
> to prevent Ctrl+Delete it's needed  to place Abort into OnBeforeDelete 
> of TSQlQuery and set dbgrid option dgConfirmDelete to false.
> To prevent adding new record it is needed to put DataSet.Cancel in 
> OnNewRecord event of assocciated tSQlQuery.

Or use a TRxDbGrid and remove from AllowedOperations aoInsert, aoAppend 
and aoDelete.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 (Ext.133)  Fax +34 93 5883007




More information about the Lazarus mailing list