J
John Smith
Why do I get above error message while executing this code:
Public Sub DropDown_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
Dim list As DropDownList = CType(sender, DropDownList)
Dim cell = CType(list.Parent, TableCell)
Dim item = CType(cell.Parent, DataGridItem)
Dim index = item.ItemIndex
Dim ds As DataSet
ds = DataGrid1.DataSource
Dim row As DataRow
row = ds.Tables(0).Select("ID = '" + item.Cells(0).Text + "'")(0)
'<--- ERROR
End Sub
Public Sub DropDown_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
Dim list As DropDownList = CType(sender, DropDownList)
Dim cell = CType(list.Parent, TableCell)
Dim item = CType(cell.Parent, DataGridItem)
Dim index = item.ItemIndex
Dim ds As DataSet
ds = DataGrid1.DataSource
Dim row As DataRow
row = ds.Tables(0).Select("ID = '" + item.Cells(0).Text + "'")(0)
'<--- ERROR
End Sub