Forums: Gridview only updates on second button click
Home > Groups > Web Forms Data Controls > Forums > Gridview only updates on second button click > Messages
Reply
Displaying 1 to 1 (of 1 messages)
Page 1 of 1
Forums

Dileep sahu
Gridview only updates on second button click
Last Post : 01st Dec, 2011
I have a textbox and a button which inserts the textbox content to the database. The data inserts okay to the db etc, however, when i click the button first time, the gridview will not update to show the latest addition. When I click the button again, the previous record then updates and becomes visible in the gridview.

The button also assigns a priority number to each record it adds. This is the code (Visual Basic):

If GridView3.Rows.Count = 0 Then
initialValue = 1
Else
initialValue = newestPriority
initialValue = initialValue + 1
End If
back to topics
Reply
  Hits : 49