AceAdmin
asked on
how do i get a value from the data item in my datagrid
I am trying to get at information that was passed into my datagrid via a datareader.
When the datagrid is set into edit mode and a button is pressed within my datagrid
Private Sub departmentsGrid_ItemComman d(ByVal source As Object, ByVal e As System.Web.UI.WebControls. DataGridCo mmandEvent Args) Handles departmentsGrid.ItemComman d
Select Case e.CommandName
Case "btnUploadFile_Click"
Dim departmentID As String = e.Item.DataItem("Departmen tID").ToSt ring
End Select
End Sub
End Class
This says
System.NullReferenceExcept ion: Object variable or With block variable not set.
Im not sure how to get at information in my datagrid.
i have also tried
DataBinder.Eval(Container. DataItem, "ImagePath")
Same thing happens
When the datagrid is set into edit mode and a button is pressed within my datagrid
Private Sub departmentsGrid_ItemComman
Select Case e.CommandName
Case "btnUploadFile_Click"
Dim departmentID As String = e.Item.DataItem("Departmen
End Select
End Sub
End Class
This says
System.NullReferenceExcept
Im not sure how to get at information in my datagrid.
i have also tried
DataBinder.Eval(Container.
Same thing happens
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.