Solved

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

Posted on 2004-09-12
1
185 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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 …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

809 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