R
ree32
I keep getting this error
colName1 is neither a DataColumn nor a DataRelation for table
tablename1
When I am trying to check for a value
Sub databoundVersion(ByVal s As Object, ByVal e As
RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType =
ListItemType.Item Then
If Not e.Item.DataItem("colName1 ") Is Nothing Then '<===
error line
If Not e.Item.DataItem("colName1 ") Is DBNull.Value
Then
If e.Item.DataItem("colName1 ") = "True" Then
End If
End If
End If
I need a way to check if the column exists while databinding. See
sometimes the columns don't exist because the data is taken from an xml
file and converted to a dataset then databound to a repeater.
colName1 is neither a DataColumn nor a DataRelation for table
tablename1
When I am trying to check for a value
Sub databoundVersion(ByVal s As Object, ByVal e As
RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType =
ListItemType.Item Then
If Not e.Item.DataItem("colName1 ") Is Nothing Then '<===
error line
If Not e.Item.DataItem("colName1 ") Is DBNull.Value
Then
If e.Item.DataItem("colName1 ") = "True" Then
End If
End If
End If
I need a way to check if the column exists while databinding. See
sometimes the columns don't exist because the data is taken from an xml
file and converted to a dataset then databound to a repeater.