By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

GridView showing twice on AJAX UpdatePanel

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.