Jump to content

Recommended Posts

Posted

Oi Pessoal - Pensava eu que já tinha resolvido a questão  :wallbash:

Como é que apago uma linha da DataGrid que adicionei mas que entretanto quero anular se essa mesma linha só aparece na grid depois do comando accionado sair do evento.

Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click

        Dim msg As String

        Dim title As String

        Dim style As MsgBoxStyle

        Dim resposta As MsgBoxResult

        msg = "Vai ser Adicionado um Novo Registo - Quer continuar?"  ' Define message.

        style = MsgBoxStyle.DefaultButton2 Or _

          MsgBoxStyle.Critical Or MsgBoxStyle.YesNo

        title = "Apagar Registo"  ' Define title.

        ' Display message.

        resposta = MsgBox(msg, style, title)

        If resposta = MsgBoxResult.No Then

            Exit Sub

        Else

            DataDateTimePicker.Focus()

        End If

    End Sub

Quando digo não o comando faz o exit sub, e só depois é que alinha aparece na grid

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.