Datagrid on WebForm not refreshing on data update

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Evans

    Datagrid on WebForm not refreshing on data update

    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
  • DKrapohl

    #2
    Re: Datagrid on WebForm not refreshing on data update

    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

    Website quality assurance testing

    Comment

    • James Evans

      #3
      Re: Datagrid on WebForm not refreshing on data update

      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[color=blue]
      >-----Original Message-----
      >Did you make sure that you have requeried the database to[/color]
      make sure[color=blue]
      >the dataset you are binding has the new record? Is your[/color]
      browser[color=blue]
      >caching (most probable answer)?
      >
      >
      >Don Krapohl
      >http://www.tranquillitas.com
      >Website quality assurance testing
      >.
      >[/color]

      Comment

      Working...