GridView in UpdatePanel only Updates once

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

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.
 
It's a List<> containing a class that has 2 string properties, nothing else.

Eliyahu Goldin said:
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Nick said:
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.
 
btw, I can step through the code, the list is definitely changing, but the
gridview isn't.

Eliyahu Goldin said:
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Nick said:
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.
 
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 said:
What oblect is the data source?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Nick said:
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.
 
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 (e-mail address removed).

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:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#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/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
| From: "Nick" <[email protected]>
| References: <[email protected]>
<[email protected]>
| 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: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 5ac439a6.bb.sky.com 90.196.57.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.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.
|
| message | > What oblect is the data source?
| >
| > --
| > Eliyahu Goldin,
| > Software Developer
| > Microsoft MVP [ASP.NET]
| > http://msmvps.com/blogs/egoldin
| > http://usableasp.net
| >
| >
| > | >> 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.
| >>
| >
| >
|
|
|
 
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 said:
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 (e-mail address removed).

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:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#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/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



--------------------
| From: "Nick" <[email protected]>
| References: <[email protected]>
<[email protected]>
| 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: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 5ac439a6.bb.sky.com 90.196.57.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.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.
|
| message | > What oblect is the data source?
| >
| > --
| > Eliyahu Goldin,
| > Software Developer
| > Microsoft MVP [ASP.NET]
| > http://msmvps.com/blogs/egoldin
| > http://usableasp.net
| >
| >
| > | >> 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.
| >>
| >
| >
|
|
|
 
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 said:
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 said:
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 (e-mail address removed).

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:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#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/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



--------------------
| From: "Nick" <[email protected]>
| References: <[email protected]>
<[email protected]>
| 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: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 5ac439a6.bb.sky.com 90.196.57.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.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.
|
| message | > What oblect is the data source?
| >
| > --
| > Eliyahu Goldin,
| > Software Developer
| > Microsoft MVP [ASP.NET]
| > http://msmvps.com/blogs/egoldin
| > http://usableasp.net
| >
| >
| > | >> 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.
| >>
| >
| >
|
|
|
 
Back
Top