Can anyone out there explain the control collection of a datagrid for me. I had thought that if a textbox was the only control in said column then it would have an id of 0. However it's in position 1, 0 is holding a literal. I am a little confused by this and am trying to wrap my head around it.
Another thing is the "Creating a Distributed Application" walkthrough. The web interface has the following code on an update (you can see it in its entirety in the walkthrough)
For i = 1 to AuthorData.authors.Columns.Count
dim t as TextBox = CType(e.Item.Cells(i).Controls, TextBox)
dim row as DataRow = AuthorData.authors(e.Item.DatasetIndex)
row(AuthorData.authors.Columns(i-1).Caption) = t.text
Next
The next part of the walkthrough uses the adapter .Update method to send changes to the database. How the heck did the dataset get those changes? Did that above little snippet of code sneakaly use some pointers without my noticing?
Maybe I am just having a bad. day.
Your input is appreciated.
I am assuming that Paul is going to grab the 1st question he seems to be the leading authority here on datagrids and there nuances. Enough rambling for me, it's your turn now. That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540
Another thing is the "Creating a Distributed Application" walkthrough. The web interface has the following code on an update (you can see it in its entirety in the walkthrough)
For i = 1 to AuthorData.authors.Columns.Count
dim t as TextBox = CType(e.Item.Cells(i).Controls, TextBox)
dim row as DataRow = AuthorData.authors(e.Item.DatasetIndex)
row(AuthorData.authors.Columns(i-1).Caption) = t.text
Next
The next part of the walkthrough uses the adapter .Update method to send changes to the database. How the heck did the dataset get those changes? Did that above little snippet of code sneakaly use some pointers without my noticing?
Maybe I am just having a bad. day.
Your input is appreciated.
I am assuming that Paul is going to grab the 1st question he seems to be the leading authority here on datagrids and there nuances. Enough rambling for me, it's your turn now. That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540