resume execution after showdialog()

ramone

Freshman
Joined
Sep 29, 2005
Messages
26
hello

i have a button in my main form that shows a modal dialogbox, the user inputs data in the dialogbox and then click ok to save the data, but the execution doesn't resume after the form.showdialog() line, heres my code:

Visual Basic:
Private Sub verBotonAgregarCita_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles verBotonAgregarCita.Click
        Dim acitas As New aCitas 'new dialogbox
        acitas.idpacientecur = idPacienteCur
        acitas.ShowDialog() 'nothing after this line will be executed

        'code to update a datagrid
        Dim query As String
        Dim citas As New DataTable
        query = "select id_cita,tratamiento,anticipo,fecha from citas where id_paciente=" + idPacienteCur
        citas = selectDatos(Me.cnxStr, query)

        verTablaCitas.DataBindings.Clear()
        verTablaCitas.SetDataBinding(citas, "")

        estilo1.MappingName = citas.TableName
        colSaldo.MappingName = citas.Columns(2).ColumnName
        colTratamiento.MappingName = citas.Columns(1).ColumnName
        colFecha.MappingName = citas.Columns(3).ColumnName
        colId.MappingName = citas.Columns(0).ColumnName
    End Sub

what can i do tho resume the execution after the showdialog call??

thank you
 
ShowDialog will pause execution of the calling sub until the form is closed or hidden. Is this the behavior that you are observing?
 
the dialogbox has a me.close, it closes and then it is supposed to resume the execution and update the datagrid
 
Do a debugger step-through, and see what happens. If you give us more info we can give you more help.
 
i think the problem is the update of the datagrid, it has only one datatable and it doesn't update with the new datatable, how can i update it??

thank you
 
Back
Top