vinosha83
09-27-2007, 07:20 AM
hi anybody help me ....i no idea why got errror when i edit my datagrid column..
please help me..
i got errro in below code
Function GetMaterialSelectedIndex(ByVal Value As Object) As Integer
Dim t As Integer
Dim dt As DataTable = dsUser.Tables("Material")
For t = 0 To dt.Rows.Count - 1
If dt.Rows(t)("MaterialType") = Value Then
Return t
End If
Next
End Function
the error page
Server Error in '/EIASystem' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 87:
Line 88: Dim dt As DataTable = dsUser.Tables("Material")
Line 89: [b] For t = 0 To dt.Rows.Count - 1 Line 90: If dt.Rows(t)("MaterialType") = Value Then
Line 91:
please help me..
i got errro in below code
Function GetMaterialSelectedIndex(ByVal Value As Object) As Integer
Dim t As Integer
Dim dt As DataTable = dsUser.Tables("Material")
For t = 0 To dt.Rows.Count - 1
If dt.Rows(t)("MaterialType") = Value Then
Return t
End If
Next
End Function
the error page
Server Error in '/EIASystem' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 87:
Line 88: Dim dt As DataTable = dsUser.Tables("Material")
Line 89: [b] For t = 0 To dt.Rows.Count - 1 Line 90: If dt.Rows(t)("MaterialType") = Value Then
Line 91: