|
-
Jan 24th, 2010, 11:32 AM
#1
Thread Starter
Junior Member
Data Grid Help
i currently have 2 forms. One has a datagrid and the other has places to type inforamtion into, witch when you press a button it Should appear on the data grid. My problem is for each different textbox field i enter (Firstname, Lastname, Dob ect..) i want each of them to go on a different column By using the scrip
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Database.DataGridView1.Rows.Add(Add_FirstName.Text)
End Sub
it automaticly goes to the first column, but i dont know how to make it go to the second.
please help me.
-Thanks
I wonder how much hangtime an giraffes crap has..?
-
Jan 24th, 2010, 05:21 PM
#2
Hyperactive Member
Re: Data Grid Help
You will have to use the Insert method of the Rows collection. This allows you to choose the position of the row to add and a ParamArray of the values
VB.Net Code:
Database.DataGridView1.Rows.Insert(Database.DataGridView1.Rows.Count - 1, Add_FirstName.Text, Add_LastName.Text, Add_DOB.Text)
To deny our own impulses is to deny the very thing that makes us human
-
Jan 25th, 2010, 02:54 AM
#3
Thread Starter
Junior Member
Re: Data Grid Help
Thanks, you helped alot :thums:
I wonder how much hangtime an giraffes crap has..?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|