Dbnavigator

Delphi

30/07/2004

Colegas,

Como faço para saber que botão do Dbnavigator foi clicado?
Gostaria de ter o controle disso, pois no botão de exclusão dependendo do registro eu gostaria de deletar toda a tabela. No evento Beforedelete não dá certo se for esse o caso.

Obrigado pela atenção e tenham um bom dia


Rookie

Rookie

Curtidas 0

Respostas

Xisto

Xisto

30/07/2004

So uma sugestao, nunca precisei de usar e nao testei.
mas esperimente usar o evento BeforeAction do DBNavigator

TNavigateBtn defines values identifying different possible buttons on a TDBNavigator object. Unit QDBCtrls type TNavigateBtn = (nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEdit, nbPost, nbCancel, nbRefresh); Description Each TNavigateBtn value identifies a different button that can appear on a TDBNavigator object. The following table lists all the button types, their corresponding TNavigateBtn values, and the action associated with each button: ButtonValueAction FirstnbFirstGo to the first record PriornbPriorGo to the previous record NextnbNextGo to the next record LastnbLastGo to the last record InsertnbInsertInsert a blank record DeletenbDeleteDelete the current record EditnbEditPermit users to edit the current record PostnbPostPost the current record CancelnbCancelCancel the current edit RefreshnbRefreshRefresh the data in the dataset



GOSTEI 0
Tnaires

Tnaires

30/07/2004

No BeforeDelete dá certo sim, se após toda a operação vc chamar a função Abort.


GOSTEI 0
Rookie

Rookie

30/07/2004

Xisto,

Valeu, a sua dica foi excelente. Funcionou como devia. Um abraço.


GOSTEI 0
POSTAR