467,859 Members | 1,361 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,859 developers. It's quick & easy.

GridView showing twice on AJAX UpdatePanel

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??

Nov 8 '07 #1
  • viewed: 2777
Share:
1 Reply
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!
|
*************************************************
"Gearůid" <gh****@gmail.comwrote in message
news:11*********************@t8g2000prg.googlegrou ps.com...
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??

Nov 8 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by davidjgonzalez | last post: by
1 post views Thread by jmdolinger | last post: by
reply views Thread by Reinhard | last post: by
4 posts views Thread by Peter | last post: by
13 posts views Thread by SAL | last post: by
8 posts views Thread by Nick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.