Datagrid on WebForm not refreshing on data update

  • Thread starter Thread starter James Evans
  • Start date Start date
J

James Evans

I am having some problems with my vb.net\asp.net\sql 2000
app. Two web forms. All stored procs for data access. One
form does inserts and delets - no problems. The other form
does the updates. The updates get into the db just fine -
and I do rebind the grid - but the grid does not refresh
until I refresh the page or cause some other postback
operation. The update button does cause a postback after
the db is updated (followed it through in debug) - the
page load event has a call to the sub that binds the grid -
followed it through also and it is flowing correctly -the
grid just does not refresh on the grid.DataBind()

This is the same chunck of code that does the original
bind whe the form is loaded - ??????????

Got me stumped
 
Did you make sure that you have requeried the database to make sure
the dataset you are binding has the new record? Is your browser
caching (most probable answer)?


Don Krapohl
http://www.tranquillitas.com
Website quality assurance testing
 
Thanks for the reply. Figured out my mistake. In the form
load I was calling the databind sub everytime instead of
correctly calling it like this just the first time tthe
form loads - this chunck fixed it:

If Not Page.IsPostBack Then
BindGrid()
End IF

Thanks Again
Jim
 
Back
Top