Pass DataSet to Modal Form

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
 
J

JD

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
 
S

Sijin Joseph

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top