The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
Go there, drop a headset on his desk, move away while starring at him with your angriest and most dangerous looking face.
And don't forget the evil laugh, as loud that his meeting partner can hear him.
Index was out of range. Must be non-negative and less than the size of the collection.
I have two winforms, and i am trying to pass data between them
Form1 has Gridview which binds to a Store procedure that selects 8 parameters from a "Guardian Table".
form2 has 8 textboxes that I want the data from Form 1 to be displayed
what I want to do is by clicking "LookUp" Button (On FORM2) to get to FORM1 and get the selected row data (when the user selects one row) and display it on form 2
Now here is my code for both forms:
Public Sub getChangesFromForm2(ByVal text1 As String, ByVal text2 As String, ByVal text3 As String, ByVal text4 As String, ByVal text5 As String, ByVal text6 As String, ByVal text7 As String, ByVal text8 As String)
DataGridView1.SelectedRows(0).Cells(0).Value = text1
DataGridView1.SelectedRows(0).Cells(1).Value = text2
DataGridView1.SelectedRows(0).Cells(2).Value = text3
DataGridView1.SelectedRows(0).Cells(3).Value = text4
DataGridView1.SelectedRows(0).Cells(4).Value = text5
DataGridView1.SelectedRows(0).Cells(5).Value = text6
DataGridView1.SelectedRows(0).Cells(6).Value = text7
DataGridView1.SelectedRows(0).Cells(7).Value = text8
PrivateSub LookUpBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LookUpBtn.Click
GuardianBasicList.getChangesFromForm2(GuardianIDTxt.Text, GuardianPhoneTxt.Text, GuardianFNameTxt.Text, GuardianMNameTxt.Text, GuardianLNameTxt.Text, GuardianEmergContFNameTxt.Text, GuardianEmergContLNameTxt.Text, GuardianEmergContPhoneTxt.Text)
What am I doing wrong? is there another way of achieving the same result??
When I run the program. I first enter data to Guardian table(Form1) and then the student table(Form2) where I want to display the data from the gridview. but when I click "LookUp" Button, thats when I get the error.
Also, the store procedure does work and I can see the data that binds to this table after I enter data on Form 1 (Guardian Table)
I would also like to know more about the methodology of the study: the researchers state: "men over 40 should spend at least 10 minutes daily admiring breasts sized D-cup or larger."
This is a very suspicious conclusion: could this be a particularly German culturally reinforced perception of what is erotic ?
Was there any matched control group used, such as men who stared ten-minutes per day at pictures of cow udders ?
Surely, a parallel study should have been done, with women looking at male pectoral muscles.
“Be patient toward all that is unsolved in your heart, and try to love the questions themselves, like locked rooms, and like books that are now written in a very foreign tongue. Do not now seek the answers, which cannot be given you because you would not be able to live them. And the point is, to live everything. Live the questions now. Perhaps you will then gradually, without noticing it, live along some distant day into the answer.”Rainer Maria Rilke
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
The space shuttle program was a disaster. Because of its cost, and it was suppose to reduce the cost of space flight, many other space programs had to cut back, and then there were the two disasters. Maybe if they had done a lot more experimentation before creating a production shuttle would have been more successful. Just like I think that they pushed nuclear power before they had a solid design for commercial power application.