shelbyinfotech
asked on
'System.Data.DataRow' does not contain a property with the name 'AUTONUM'
DataGrid-Error-aspx_vb.txtI'm calling a SQL stored procedure into a DataSet. Then, putting it into a DataRow so I can Sort and Filter it (later) once it's in the DataRow. Using Dataset Visualizer, I've confirmed that the dataset does contain data and includes the column 'AUTONUM'.
I can't figure out why I seem getting the error message on the "End If" in the following section of code.
Private Sub ctlList_ItemDataBound(...)
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingIt em Or _
e.Item.ItemType = ListItemType.SelectedItem Then
.
.
.
End If
I copied this code from another one of my projects which does work; but sends a sql string to the server to retrieve the data. I need to use a Stored Procedure instead.
See attached file for aspx and vb.
I can't figure out why I seem getting the error message on the "End If" in the following section of code.
Private Sub ctlList_ItemDataBound(...)
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingIt
e.Item.ItemType = ListItemType.SelectedItem Then
.
.
.
End If
I copied this code from another one of my projects which does work; but sends a sql string to the server to retrieve the data. I need to use a Stored Procedure instead.
See attached file for aspx and vb.
The problem is most probably in the code that you do not show between the If and the End If. It looks as if you do not use the proper syntax to reference the column somewhere in that code.
ASKER
The full code is in the attached text file.
You seem to have forgotten to attach the file.
ASKER
I see it as a link in the first line of the question ...???
Sorry, I cannot see anything that could cause the error.
I hope somebody else will be able to find the problem.
I hope somebody else will be able to find the problem.
This rather seems you are not able to evaluate this expression on your ASPX page:
DataBinder.Eval(Container. DataItem, "AUTONUM")
Try to remove that part and you'll then know where the problem is.
DataBinder.Eval(Container.
Try to remove that part and you'll then know where the problem is.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you that was the problem.
Great. Good luck!