Hi All
Im doing a small conversion in vb.net all i wanted to do is to take a value from one of the column in datagrid and convert it into integer value and accordingly display data. Code is like this
Public Sub ChangeColor(ByVal sender As Object, ByVal e As DataGridItemEventArgs)
If e.Item.ItemType <> ListItemType.Header Or e.Item.ItemType <> ListItemType.Footer Then
If Integer.Parse(e.Item.Cells(5).Text, Globalization.NumberStyles.Integer) < 60 Then
e.Item.Cells(5).Text = e.Item.Cells(5).Text + "Min"
End If
End If
I have tried Ctype, Convert and now trying with Integer.Parse but all of them give the same error
Exception Details: System.FormatException: Input string was not in a correct format
Please can some body help me in such a stupid problem
Pleaseeee ?
Thanking you all in advance
Im doing a small conversion in vb.net all i wanted to do is to take a value from one of the column in datagrid and convert it into integer value and accordingly display data. Code is like this
Public Sub ChangeColor(ByVal sender As Object, ByVal e As DataGridItemEventArgs)
If e.Item.ItemType <> ListItemType.Header Or e.Item.ItemType <> ListItemType.Footer Then
If Integer.Parse(e.Item.Cells(5).Text, Globalization.NumberStyles.Integer) < 60 Then
e.Item.Cells(5).Text = e.Item.Cells(5).Text + "Min"
End If
End If
I have tried Ctype, Convert and now trying with Integer.Parse but all of them give the same error
Exception Details: System.FormatException: Input string was not in a correct format
Please can some body help me in such a stupid problem
Thanking you all in advance