Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

 

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

Posted
Because when you do a showdialog it stops the program until what ever you are showing is handled.
Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...