Solved

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

Posted on 2004-09-12
1
188 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

707 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