VB.NET Problem

  • Thread starter Thread starter sql
  • Start date Start date
S

sql

Hi friend,

I am using a master form in vb.net having two child forms.
first one contain combobox of Customers Name.
and have a button to create new .
The second form has the code to create in Customer (New Customer
Registration Form).

it's working fine,but i need all that when user click on
CreateNewCustomer Button the second pop up and user fill the form.
as soon as submit the(second form) it should be closed and the
Combobox of the first form should updated (Means add the new
customer )
The combobox of customer on first form is databound

all i need to fire a public event to fill the combobox from second
form
thanx in advance
 
The second form should be created from the form template 'Dialog' and should
be called using ShowDialog. This means that code processing in the calling
form is suspended until the called form is closed. The call will return an
OK or Cancel result, so your code in the calling form can assume that if OK
is returned (Submit in your example) then the called form will have all its
values properly filled in. So you can simply write sequential code to show
the form and then gather the required data from the form's properties and
process them as required in the calling form.

You can search MSDN with Dialog Template or similar to see examples.
 
The second form should be created from the form template 'Dialog' and should
be called using ShowDialog. This means that code processing in the calling
form is suspended until the called form is closed. The call will return an
OK or Cancel result, so your code in the calling form can assume that if OK
is returned (Submit in your example) then the called form will have all its
values properly filled in.  So you can simply write sequential code to show
the form and then gather the required data from the form's properties and
process them as required in the calling form.

You can search MSDN with Dialog Template or similar to see examples.









- Show quoted text -

OR you can simple use add a handler to the edit control change event
and update your data source when the event is raised.
 
Back
Top