473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

GridView in UpdatePanel only Updates once

Hi there,

I have a GridView in an UpdatePanel, each time the UpdatePanels Load
event fires I set the DataSource and call DataBind of the grid view. This
works great once, I add an item to the list and the control updates, my
breakpoints get in in the UpdatePanel Load event. Only problem is on the
second time, even though the code is executed, the GridView doesn't change.
I have disabled the view state for the grid view but still the problem
persists.

So just to clarify, when the page loads, the grid view always displays
the correct items, when the update panel is refreshed for the first time it
displays the new items, the second time it stays the same.

Any ideas what I'm missing?

Nick.
Oct 23 '08 #1
8 6229
I should also mention that this all occurs inside of a UserControl.

"Nick" <a@a.comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
Hi there,

I have a GridView in an UpdatePanel, each time the UpdatePanels Load
event fires I set the DataSource and call DataBind of the grid view. This
works great once, I add an item to the list and the control updates, my
breakpoints get in in the UpdatePanel Load event. Only problem is on the
second time, even though the code is executed, the GridView doesn't
change. I have disabled the view state for the grid view but still the
problem persists.

So just to clarify, when the page loads, the grid view always displays
the correct items, when the update panel is refreshed for the first time
it displays the new items, the second time it stays the same.

Any ideas what I'm missing?

Nick.

Oct 23 '08 #2
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Nick" <a@a.comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
Hi there,

I have a GridView in an UpdatePanel, each time the UpdatePanels Load
event fires I set the DataSource and call DataBind of the grid view. This
works great once, I add an item to the list and the control updates, my
breakpoints get in in the UpdatePanel Load event. Only problem is on the
second time, even though the code is executed, the GridView doesn't
change. I have disabled the view state for the grid view but still the
problem persists.

So just to clarify, when the page loads, the grid view always displays
the correct items, when the update panel is refreshed for the first time
it displays the new items, the second time it stays the same.

Any ideas what I'm missing?

Nick.

Oct 23 '08 #3
It's a List<containing a class that has 2 string properties, nothing else.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:ON**************@TK2MSFTNGP06.phx.gbl...
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Nick" <a@a.comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
>Hi there,

I have a GridView in an UpdatePanel, each time the UpdatePanels Load
event fires I set the DataSource and call DataBind of the grid view.
This works great once, I add an item to the list and the control updates,
my breakpoints get in in the UpdatePanel Load event. Only problem is on
the second time, even though the code is executed, the GridView doesn't
change. I have disabled the view state for the grid view but still the
problem persists.

So just to clarify, when the page loads, the grid view always displays
the correct items, when the update panel is refreshed for the first time
it displays the new items, the second time it stays the same.

Any ideas what I'm missing?

Nick.


Oct 23 '08 #4
btw, I can step through the code, the list is definitely changing, but the
gridview isn't.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:ON**************@TK2MSFTNGP06.phx.gbl...
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Nick" <a@a.comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
>Hi there,

I have a GridView in an UpdatePanel, each time the UpdatePanels Load
event fires I set the DataSource and call DataBind of the grid view.
This works great once, I add an item to the list and the control updates,
my breakpoints get in in the UpdatePanel Load event. Only problem is on
the second time, even though the code is executed, the GridView doesn't
change. I have disabled the view state for the grid view but still the
problem persists.

So just to clarify, when the page loads, the grid view always displays
the correct items, when the update panel is refreshed for the first time
it displays the new items, the second time it stays the same.

Any ideas what I'm missing?

Nick.


Oct 23 '08 #5
How strange...

Just to complicate matters, I have just uploaded a build to the server and
it works fine. But locally it doesn't work... :-\

Any ideas what could cause that?

Nick.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:ON**************@TK2MSFTNGP06.phx.gbl...
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Nick" <a@a.comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
>Hi there,

I have a GridView in an UpdatePanel, each time the UpdatePanels Load
event fires I set the DataSource and call DataBind of the grid view.
This works great once, I add an item to the list and the control updates,
my breakpoints get in in the UpdatePanel Load event. Only problem is on
the second time, even though the code is executed, the GridView doesn't
change. I have disabled the view state for the grid view but still the
problem persists.

So just to clarify, when the page loads, the grid view always displays
the correct items, when the update panel is refreshed for the first time
it displays the new items, the second time it stays the same.

Any ideas what I'm missing?

Nick.


Oct 23 '08 #6
Hi Nick,

From your description it's really very strange. I could not think of any
possible reasons for now .Could you send me a demo project that can
reproduce this problem? I'll try it to see if I can repro it on my side. My
email is v-******@microsoft.com.

To investigate this issue, I also need following information:

1. Are the server and the development machine two machines or the same one?
2. Do you test the page on the same client machine and in the same explorer?
3. Please provide the operating system, IE version, IIS version and Visual
Studio edition.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Nick" <a@a.com>
| References: <us**************@TK2MSFTNGP06.phx.gbl>
<ON**************@TK2MSFTNGP06.phx.gbl>
| Subject: Re: GridView in UpdatePanel only Updates once
| Date: Thu, 23 Oct 2008 14:06:53 +0100
| Lines: 45
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-RFC2646: Format=Flowed; Response
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| Message-ID: <uU*************@TK2MSFTNGP02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 5ac439a6.bb.sky.com 90.196.57.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:78466
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| How strange...
|
| Just to complicate matters, I have just uploaded a build to the server
and
| it works fine. But locally it doesn't work... :-\
|
| Any ideas what could cause that?
|
| Nick.
|
| "Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
| message news:ON**************@TK2MSFTNGP06.phx.gbl...
| What oblect is the data source?
| >
| --
| Eliyahu Goldin,
| Software Developer
| Microsoft MVP [ASP.NET]
| http://msmvps.com/blogs/egoldin
| http://usableasp.net
| >
| >
| "Nick" <a@a.comwrote in message
| news:us**************@TK2MSFTNGP06.phx.gbl...
| >Hi there,
| >>
| > I have a GridView in an UpdatePanel, each time the UpdatePanels
Load
| >event fires I set the DataSource and call DataBind of the grid view.
| >This works great once, I add an item to the list and the control
updates,
| >my breakpoints get in in the UpdatePanel Load event. Only problem is
on
| >the second time, even though the code is executed, the GridView
doesn't
| >change. I have disabled the view state for the grid view but still the
| >problem persists.
| >>
| > So just to clarify, when the page loads, the grid view always
displays
| >the correct items, when the update panel is refreshed for the first
time
| >it displays the new items, the second time it stays the same.
| >>
| > Any ideas what I'm missing?
| >>
| >Nick.
| >>
| >
| >
|
|
|

Oct 24 '08 #7
Hi Allen,

Unfortunately I cannot send an isolated project as the code is part of a
much larger solution, and I do not have the time to create a separate
project. On the other hand, I have identified a possible cause of the
problem as a 3rd party Ajax control currently on the same page is generating
a script error that I hadn't noticed. I am trying to get this script error
resolved before I proceed further.

At current, the Update Panel seems to be acting irratically, sometimes
it updates, sometimes it doesn't, and this is on the live server. I thought
it was working perfect to start with but unfortunately this is not the case.
If the problem persists after resolving this script issue I shall contact
yourself via the email provided and show you a live demo of the problem
occuring.

Thanks a million for your time and help it's much appreciated.

Nick.

"Allen Chen [MSFT]" <v-******@online.microsoft.comwrote in message
news:83**************@TK2MSFTNGHUB02.phx.gbl...
Hi Nick,

From your description it's really very strange. I could not think of any
possible reasons for now .Could you send me a demo project that can
reproduce this problem? I'll try it to see if I can repro it on my side.
My
email is v-******@microsoft.com.

To investigate this issue, I also need following information:

1. Are the server and the development machine two machines or the same
one?
2. Do you test the page on the same client machine and in the same
explorer?
3. Please provide the operating system, IE version, IIS version and Visual
Studio edition.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
| From: "Nick" <a@a.com>
| References: <us**************@TK2MSFTNGP06.phx.gbl>
<ON**************@TK2MSFTNGP06.phx.gbl>
| Subject: Re: GridView in UpdatePanel only Updates once
| Date: Thu, 23 Oct 2008 14:06:53 +0100
| Lines: 45
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-RFC2646: Format=Flowed; Response
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| Message-ID: <uU*************@TK2MSFTNGP02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 5ac439a6.bb.sky.com 90.196.57.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:78466
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| How strange...
|
| Just to complicate matters, I have just uploaded a build to the server
and
| it works fine. But locally it doesn't work... :-\
|
| Any ideas what could cause that?
|
| Nick.
|
| "Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
| message news:ON**************@TK2MSFTNGP06.phx.gbl...
| What oblect is the data source?
| >
| --
| Eliyahu Goldin,
| Software Developer
| Microsoft MVP [ASP.NET]
| http://msmvps.com/blogs/egoldin
| http://usableasp.net
| >
| >
| "Nick" <a@a.comwrote in message
| news:us**************@TK2MSFTNGP06.phx.gbl...
| >Hi there,
| >>
| > I have a GridView in an UpdatePanel, each time the UpdatePanels
Load
| >event fires I set the DataSource and call DataBind of the grid view.
| >This works great once, I add an item to the list and the control
updates,
| >my breakpoints get in in the UpdatePanel Load event. Only problem is
on
| >the second time, even though the code is executed, the GridView
doesn't
| >change. I have disabled the view state for the grid view but still
the
| >problem persists.
| >>
| > So just to clarify, when the page loads, the grid view always
displays
| >the correct items, when the update panel is refreshed for the first
time
| >it displays the new items, the second time it stays the same.
| >>
| > Any ideas what I'm missing?
| >>
| >Nick.
| >>
| >
| >
|
|
|

Oct 24 '08 #8
Hi again Allen,

Thankfully I have recieved a new build of the 3rd party ajax controls
causing the script error and this has resolved all issues. Hurrah.

Cheers again for your help.

Nick.

"Nick" <a@a.comwrote in message
news:uq**************@TK2MSFTNGP05.phx.gbl...
Hi Allen,

Unfortunately I cannot send an isolated project as the code is part of a
much larger solution, and I do not have the time to create a separate
project. On the other hand, I have identified a possible cause of the
problem as a 3rd party Ajax control currently on the same page is
generating a script error that I hadn't noticed. I am trying to get this
script error resolved before I proceed further.

At current, the Update Panel seems to be acting irratically, sometimes
it updates, sometimes it doesn't, and this is on the live server. I
thought it was working perfect to start with but unfortunately this is not
the case. If the problem persists after resolving this script issue I
shall contact yourself via the email provided and show you a live demo of
the problem occuring.

Thanks a million for your time and help it's much appreciated.

Nick.

"Allen Chen [MSFT]" <v-******@online.microsoft.comwrote in message
news:83**************@TK2MSFTNGHUB02.phx.gbl...
>Hi Nick,

From your description it's really very strange. I could not think of any
possible reasons for now .Could you send me a demo project that can
reproduce this problem? I'll try it to see if I can repro it on my side.
My
email is v-******@microsoft.com.

To investigate this issue, I also need following information:

1. Are the server and the development machine two machines or the same
one?
2. Do you test the page on the same client machine and in the same
explorer?
3. Please provide the operating system, IE version, IIS version and
Visual
Studio edition.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
================================================= =
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
| From: "Nick" <a@a.com>
| References: <us**************@TK2MSFTNGP06.phx.gbl>
<ON**************@TK2MSFTNGP06.phx.gbl>
| Subject: Re: GridView in UpdatePanel only Updates once
| Date: Thu, 23 Oct 2008 14:06:53 +0100
| Lines: 45
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-RFC2646: Format=Flowed; Response
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| Message-ID: <uU*************@TK2MSFTNGP02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 5ac439a6.bb.sky.com 90.196.57.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:78466
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| How strange...
|
| Just to complicate matters, I have just uploaded a build to the server
and
| it works fine. But locally it doesn't work... :-\
|
| Any ideas what could cause that?
|
| Nick.
|
| "Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
| message news:ON**************@TK2MSFTNGP06.phx.gbl...
| What oblect is the data source?
| >
| --
| Eliyahu Goldin,
| Software Developer
| Microsoft MVP [ASP.NET]
| http://msmvps.com/blogs/egoldin
| http://usableasp.net
| >
| >
| "Nick" <a@a.comwrote in message
| news:us**************@TK2MSFTNGP06.phx.gbl...
| >Hi there,
| >>
| > I have a GridView in an UpdatePanel, each time the UpdatePanels
Load
| >event fires I set the DataSource and call DataBind of the grid view.
| >This works great once, I add an item to the list and the control
updates,
| >my breakpoints get in in the UpdatePanel Load event. Only problem
is
on
| >the second time, even though the code is executed, the GridView
doesn't
| >change. I have disabled the view state for the grid view but still
the
| >problem persists.
| >>
| > So just to clarify, when the page loads, the grid view always
displays
| >the correct items, when the update panel is refreshed for the first
time
| >it displays the new items, the second time it stays the same.
| >>
| > Any ideas what I'm missing?
| >>
| >Nick.
| >>
| >
| >
|
|
|


Oct 24 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
2
by: mike | last post by:
I have a page with a LoginView which contains a Gridview and a DetailsView, each in its own UpdatePanel The problem that I am experiencing is that when I select a record in the Gridview (using a...
1
by: podpi | last post by:
Hello I'm having a bit of a proooblem. I have a gridview which has a checkbox as one of the templatecolumn's. When it is checked, it hides a textbox containing a DateTime templatefield...
0
by: jrnail23 | last post by:
I have a user control which contains an UpdatePanel, which contains a MultiView inside, with a GridView in one of the views. In my GridView, I have a ButtonField which is supposed to trigger a...
1
by: SachinSachin | last post by:
Hi All, I am implementing a custom gridview control, that emits some javascript to blink a row whenever a new row is added in gridview. The gridview is inside the <asp:updatepanel> for...
1
by: Mike | last post by:
How can I 'refresh' my gridview without refreshing the entire page? I have a button that allows the use to execute a query and then the results are shown in the grid once its done. The thing is the...
1
by: =?Utf-8?B?cmxt?= | last post by:
I have standard gridview in an updatePanel with an AJAX timer that refreshes the data every 5 seconds by calling the grids DataBind method in the tick event. This works great. However, I have a...
4
by: foolmelon | last post by:
Before AJAX, we were able to focus a cell in a gridview during a fullpage postback. After putting the gridview inside an UpdatePanel, we cannot focus a cell in this gridview anymore. Does anybody...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.