Pass DataSet to Modal Form

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

I have built a main form that creates and fills a dataset. I want to open a
modal form and pass it one of the tables in the dataset but I don't know how
to code it in VB. Does anyone have an example or point me in the right
direction to find some code?

thanks
 
Sijin,
Thanks that worked well.
Once I have passed the 'new' modal form the datatable, How do I synchornize
the modal form when the record in the main form is moved to either "next"
or "previous" using navigation buttons? Right now the data that shows in
the grid on the modal form is for the first record in the dataset no matter
which record shows in the main form.
jim
 
Ok in this case you will also need to pass the BindingContext of the
parent form to the modal form and set the BindingContext of the Modal
form to this passed BindingContext, something like

public class ModalForm
{
public ModalForm(BindingContext ctxt,DataTable table)
{
this.BindingContext = ctxt;
...
}
}


Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 
Back
Top