> 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
> You need to modify the constructor of the form so that it takes a
> DataTable as a parameter and then pass the datatable as a parameter when
[quoted text clipped - 10 lines]
>>
>> thanks
Sijin Joseph - 28 Sep 2004 07:18 GMT
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
> Sijin,
> Thanks that worked well.
[quoted text clipped - 19 lines]
>>>
>>>thanks
JD - 29 Sep 2004 20:45 GMT
thank you
> 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
[quoted text clipped - 36 lines]
>>>>
>>>>thanks