Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Cannot update value

$
0
0
Hi all,
here is my code.
With DGVMargin
            For i As Integer = 0 To .Rows.Count - 1
                If txttype.Text = "NORMAL" Then
                    If txtDiscount.Text = .Rows(i).Cells("DiscountNormal").Value Then
                        decodeDiscount()
                        Updatefunction()
                        Exit For
                    Else
                        decodeDiscount()
                        Insert()
                        Exit For
                    End If
  Next
        End With

Now i want to update the txtDiscount value if it is already exist,else it will go to insert a new data.
Now the problem is it will not going to update the value even already have the same txtDiscount value. The system will always go to the Insert() function. It will not go Updatefunction to update the value.
Is there any problem or mistake in my code?
Your help is appreciated. Thanks.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>