Solved

Transfer data from one form to a grid bounded to data set on another form?

Posted on 2004-09-12
1
186 Views
Last Modified: 2010-04-23
I have two forms: TimeSheet form and Client Search form.
In Client Search form I have three list boxes: Family Name, Client Name, and ClientCode.

When I click on SELECT button on Client Search form I want to input selected data in three list boxes listed above and insert that data in TimeSheetForm data grid that is bounded to a TimeSheetDataSet dataSource that has a table with columns 'FamilyName', 'ClientName', and 'ClientCode'.  

How do I transfer data from ClientSearch form and insert values on the appropriate data grid fields in TimeSheet form.

Thank you in advance,

Zorica
0
Comment
Question by:zorica329
1 Comment
 
LVL 10

Accepted Solution

by:
123654789987 earned 125 total points
ID: 12041287
U can set a property in the ClientSearch form that can be used to access the data

In ClientSearch Form say u have a information in the form of three datatables. Insert these datatables into a dataset.

dataset1.Tables["FamilyName"]
dataset1.Tables["ClientName"]
dataset1.Tables["ClientCode"]

Then store the dataset as a property in ClientSearch form

Public Property Prop1() As Dataset
      Get
        return dataset1
     End Get
   Set(ByVal Value As String)
               dataset1= Value
      End Set
     End Property

This property can be accessed by the TimeSheet form

Dim clientFrm as ClientSearchForm
clientFrm = new ClientSearchForm

Dim dataset2 as new Dataset
dataset2 = clientFrm.Prop1

U can extract the datatables from this dataset



0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question