GridView showing twice on AJAX UpdatePanel

  • Thread starter =?iso-8859-1?B?R2VhcvNpZA==?=
  • Start date
?

=?iso-8859-1?B?R2VhcvNpZA==?=

Strange problem...

Have a gridview on a page (within an update panel) for displaying
event dates.

GridView loads fine first time around with the PageLoad.

There are 2 text fields a user can use to enter a new new. Upon
clicking the "Add Button" these are added to the database, the
gridview refreshes its datasource and the GridView is reloaded through
the UpdatePanel to show the extra row.

HOWEVER, when the update panel refreshes it now shows TWO grids, on
top is the new one with the extra row, and beneath is the original
with the rows from the initial page loads. Any subsequent dates that
are added are put into the first grid fine but the second beneath
always remains on the page with the original rows from the first page
load.

Any ideas why this might be??
 
C

Cowboy \(Gregory A. Beamer\)

It has to do with how you are binding the grid. Most likely you are using
Page_Load to initially fill the grid and then rebinding with the asynch AJAX
call. If so, you are creating a grid and then creating a second one. If both
are done via the "same channel" (same way of filling the grid) you should be
fine. Without seeing code, I can only guess.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top