How to use an object to travel data from one form to another
Hi,
I have two forms.Both having DatagridView.There are two comboboxes to filter the record from Database and fill in Datagridview.My requirement is when all the data is populated in DataGrid after selecting the comboboxes and when the user clicks on Delete.
The comboboxes and Datagrid on second form should have the same values as that was on first form.The names of my Comboboxes and Datagridview are same on both the forms
Below is the code my Datagrid view getting populated in First Form.
Sub GetData(ByVal StrQuery As String)
        If CBMedium.Text <> "" And CBClass.Text <> "" Then
            DGVStudRecord.Rows.Clear()
            con = DBConnect()
            cmd = New SqlCommand(StrQuery, con)
            dr = cmd.ExecuteReader
            If dr.HasRows Then
                While dr.Read
                  
                    DGVStudRecord.Rows.Add(dr(0), dr(1), dr(2), dr(3), dr(4), dr(5))
                End While
            End If
            con.Close()
        
        End If
    End Sub
Please suggest how can i populate my datagrid in second form by using the Data populated in Datagrid of Firrt Form


Software/Hardware used:
Miscrosoft Visual Studio
ASKED: September 7, 2011  7:18 AM
UPDATED: March 31, 2012  5:04 PM

Answer Wiki:
Without DNS, computers would have a very tough time communicating with each other. However, most Windows administrators still rely on WINS for name resolution on local area networks and some have little or no experience with DNS. Steven Warren explains how to install, configure, and troubleshoot a Windows Server 2008 DNS server. You can install a DNS server from the Control Panel or when promoting a member server to a domain controller (DC) (Figure A). During the promotion, if a DNS server is not found, you will have the option of installing it. For more information please visit <a href="http://www.pyramidci.com/about-us">it consulting company</a>
Last Wiki Answer Submitted:  September 7, 2011  1:38 pm  by  Johnjam   15 pts.
All Answer Wiki Contributors:  Johnjam   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _