473,799 Members | 2,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid table from form1 to form2

7 New Member
I have two forms, form1 & form 2. Form1 has datagridview. I am not supposed use any sql command in form1. So i added form2 and wrote the sql commands using stored procedures to get the data from the table. The problem is the datagridview is unavailable in form2. I donno how to link datagridview from form1 and form2 or either way.I am using c#.net
Aug 22 '08 #1
1 1545
r035198x
13,262 MVP
You can pass it through the constructor or as a parameter to a method ...
Aug 22 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1740
by: Wishing I was skiing mom | last post by:
In form1, which is an item master maintenance screen, I have a button which launches form2. Form2 contains an item master datagrid. After the user double-clicks the desired item record in form2 I want the field values from the selected record to populate text boxes in form 1 so the user can make changes to the item (ie. description, cost etc.). I have gotten as far as populating a field in form1 with the mapping name or the current row...
1
3778
by: nic | last post by:
Hi I have two forms form1 and form2. I am trying to get all the data entered in form1 to be updated to the table on an event. ie. when I click the button to load form2, I need the data from form1 to exist in the table for relationship reasons. form2 works fine if the records displayed in form1 already exist in the table, ie form1 was closed then re-opened or moving between records will also write the data to the table. But if I have...
4
2211
by: Pacific Design Studios | last post by:
I have a DataGrid on Form1 that displays a small amount of information about employees. On Form2 I want to have all the data displaying in text boxes about the employee selected in the datagrid on form 1. Is there a Id in the datagrid I can use to find out which user was selected or which record was highlighted when double clicked. Something like: John Thomas Employee Id 2637 was selected on Form1 and the recordset on Form2 would use...
0
1904
by: Melson | last post by:
Hi Can anyone help me with this problem. I've a form1(entry form) with datagrid which bound to a dataset (datagrid.setdatabinding(dataset,"table")). I've a public class Capturekey in form1 which capture key entered in the datagrid cell. I've another form2(product code form) which has a listview display product code. My problem is how can I pass the product code and product description in form2 back to form1 datagrid current cell.
10
2753
by: mark | last post by:
I have a simple windows application that has a function to read a csv file and enter the values into an array A as double(,). Also, an instance of form 2 (which has a DataGrid) is created and the values of A are used to populate the grid via a DataView. The instance of form2 is called Matrix_A . The basic layout is as follows: #Region "Globals Dim A As Double(,) Dim Matrix_A As form2 #End Region
9
9771
by: mfahnestock | last post by:
Hi all! Aspiring VB programmer losing hair <And Sleep> over this problem. I have spent several days researching through the various usenets and resources to no avail, and so now I am taking the next step. Situation: I have a form (Form 1) with a datagrid that has a context menu for adding updated records. When selecting the "Add Option" a second form (Form 2) is displayed for data population. The user saves the
2
1130
by: Miro | last post by:
VB 2005 express... I created a database "Staff" and it has 1 table in it. There are 3 columns in it so far. "StaffID" -INT - Primary Key auto incremented by 1 "FirstName" - Varchar "LastName" - varchar ( there will be more later - but baby steps ) Then I created 2 forms.
2
5884
by: SePp | last post by:
Hi all. I want to refresh a Datagrid from another form. For Example I have a Datagrid in that I want to edit data. The user has the ability to press a button to change these data. A new Form opens and the user changes the data. After that he saves the changes and the current form is closing and the old form with the datagrid gets the focus again.
1
4282
by: psyvanz | last post by:
i have created 2 tables name table1 and table2 with the same fieldnames in subjectnumber(sub-0001), subjectname(english1) but in my table2 i added studentnumber(s-0001) and studentname(paul) im using dataenvironment in connecting my (table1) ms access 2007 database in a datagrid but my problem is how to save and add all information bind(table1) in datagrid into another database table2 in my ms access, i want to connect what is inside my...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10225
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.