J
Jeffrey Spoon
Hello, according to the docs you can update a DataGrid with an
ArrayList. I have created an ArrayList and I add these objects:
Dim patient1 As New Person
patient1.Reading = 1
patient1.ReadingValue = 50
myArray.add(person1)
Dim patient2 As New Person
patient2.Reading = 2
patient1.ReadingValue = 60
myArray.add(person1)
Then I bind it to a DataGrid:
DataGrid1.DataSource = myArray
DataGrid1.SetDataBinding(myArray, "")
Public Class Person
Public Reading As Integer
Public ReadingValue As Integer
End Class
I have set the DataGridTableStyle with the MappingName myArray.
It does update the DataGrid with two entries, but they don't contain
anything (AFAIK) How do I get the Reading and ReadingValue fields into
the Datagrid via the ArrayList?
I'm hoping to eventually update an MSChart using the datagrid but I'm
not sure if the Datagrid actually contains any data.
ArrayList. I have created an ArrayList and I add these objects:
Dim patient1 As New Person
patient1.Reading = 1
patient1.ReadingValue = 50
myArray.add(person1)
Dim patient2 As New Person
patient2.Reading = 2
patient1.ReadingValue = 60
myArray.add(person1)
Then I bind it to a DataGrid:
DataGrid1.DataSource = myArray
DataGrid1.SetDataBinding(myArray, "")
Public Class Person
Public Reading As Integer
Public ReadingValue As Integer
End Class
I have set the DataGridTableStyle with the MappingName myArray.
It does update the DataGrid with two entries, but they don't contain
anything (AFAIK) How do I get the Reading and ReadingValue fields into
the Datagrid via the ArrayList?
I'm hoping to eventually update an MSChart using the datagrid but I'm
not sure if the Datagrid actually contains any data.