moonis_ahmed
asked on
how to pass textbox data into a datagridview on a separate form in vb.net
Hi, I have eight textboxes and corresponding labels on one form and one button. i have another form with a datagridview. On the click of the button on form1 i want to pass the content of the textboxes and corresponding labels' text into the datagridview on form2 only for those textboxes which are not empty. I would greatly appreciate a help in this matter in the form of syntax since i am a beginner in vb.net
Note: Its a vb.net windows application
Note: Its a vb.net windows application
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ex:
In Form1.
Add up all rows to dataset
Dim f2 As New Form2()
f2.Init(ds)
f2.show()
In Form2
Dim localds As DataSet
Public Sub Init(byVal ds As DataSet)
{
localds = ds
}
publicSub Load()
{
GridView1.DataSource = localds
Gridview1.DataBind()
}