hello all
i need a little help.
i am trying to fill a datagrid on form 2 with data from a textbox in form 1 but i can't find how to do this.
for moving of data across forms i can do that by
frm as new form2
frm.datagrid.datasource=ds.tables (i can do it)
but binding the text box to the datagrid is my worry.
i have 4 textboxes
text1
text2
text3
text4
and i want to populate the datagrid with all the content when i click a button( called Add)
how best can i handle this.
my research.
i can use an arraylist or build data tables but dont no how
counting on you all
fill a datagrid with values from a textbox
Page 1 of 11 Replies - 511 Views - Last Post: 02 May 2011 - 12:56 PM
Replies To: fill a datagrid with values from a textbox
#2
Re: fill a datagrid with values from a textbox
Posted 02 May 2011 - 12:56 PM
i tried this but it did not show anything
Dim ds As New DataSet
Dim dt As New DataTable()
Dim frm As New frmRegister
dt.Columns.Add(New DataColumn("Location", GetType(String)))
dt.Columns.Add(New DataColumn("IP", GetType(String)))
dt.Columns.Add(New DataColumn("Status", GetType(String)))
dt.Rows.Add(New String() {Me.txtChildFullname.Text, txtChildFullname.Text, txtChildFullname.Text})
dt.Rows.Add(New String() {txtChildFullname.Text, txtChildFullname.Text, txtChildFullname.Text})
frm.dgChildren.DataSource = dt
This post has been edited by modi123_1: 02 May 2011 - 01:01 PM
Reason for edit:: please use code tags
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|