C
conorw
All,
This issue is driving me nuts, someone please help.
When I try to access a property in a simple datarow view I get a null
reference exception.
Below is a very simple sample to recreate this issue.
Dim ptbTmp As New Data.DataTable
'add a column and a row
ptbTmp.Columns.Add("MyCode")
ptbTmp.Rows.Add("testCode")
Dim pvwView As New Data.DataView(ptbTmp)
For Each pobj As Data.DataRowView In pvwView
'i get null ref exception here!!
MsgBox(pobj.GetType.GetProperty("MyCode").GetValue(pobj,
Nothing))
Next
This issue is driving me nuts, someone please help.
When I try to access a property in a simple datarow view I get a null
reference exception.
Below is a very simple sample to recreate this issue.
Dim ptbTmp As New Data.DataTable
'add a column and a row
ptbTmp.Columns.Add("MyCode")
ptbTmp.Rows.Add("testCode")
Dim pvwView As New Data.DataView(ptbTmp)
For Each pobj As Data.DataRowView In pvwView
'i get null ref exception here!!
MsgBox(pobj.GetType.GetProperty("MyCode").GetValue(pobj,
Nothing))
Next