Solved

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

Posted on 2004-09-12
1
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Import MySQL data into MS Access using VB.Net interface 5 67
Name Space error VS2015 1 47
DataGridView / get bound table name? 8 47
vb.net datagrid point 4 32
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 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