Fórum Dbnavigator #245169

30/07/2004

0

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

Responder

Posts

30/07/2004

Xisto

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



Responder

Gostei + 0

30/07/2004

Tnaires

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


Responder

Gostei + 0

02/08/2004

Rookie

Xisto,

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


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar