Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > GridView in UpdatePanel only Updates once

Reply
Thread Tools

GridView in UpdatePanel only Updates once

 
 
Nick
Guest
Posts: n/a
 
      10-23-2008
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.


 
Reply With Quote
 
 
 
 
Nick
Guest
Posts: n/a
 
      10-23-2008
I should also mention that this all occurs inside of a UserControl.

"Nick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      10-23-2008
What oblect is the data source?

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


"Nick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      10-23-2008
It's a List<> containing a class that has 2 string properties, nothing else.

"Eliyahu Goldin" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> What oblect is the data source?
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Nick" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>>

>
>



 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      10-23-2008
btw, I can step through the code, the list is definitely changing, but the
gridview isn't.

"Eliyahu Goldin" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> What oblect is the data source?
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Nick" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>>

>
>



 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      10-23-2008
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" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> What oblect is the data source?
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Nick" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>>

>
>



 
Reply With Quote
 
Allen Chen [MSFT]
Guest
Posts: n/a
 
      10-24-2008
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 http://www.velocityreviews.com/forums/(E-Mail 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 Removed).

==================================================
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" <(E-Mail Removed)>
| References: <(E-Mail Removed)>
<(E-Mail Removed)>
| 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$(E-Mail Removed)>
| 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" <(E-Mail Removed)> wrote in
| message news:(E-Mail Removed)...
| > What oblect is the data source?
| >
| > --
| > Eliyahu Goldin,
| > Software Developer
| > Microsoft MVP [ASP.NET]
| > http://msmvps.com/blogs/egoldin
| > http://usableasp.net
| >
| >
| > "Nick" <(E-Mail Removed)> wrote in message
| > news:(E-Mail Removed)...
| >> 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.
| >>
| >
| >
|
|
|

 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      10-24-2008
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 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 Removed).
>
> ==================================================
> 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" <(E-Mail Removed)>
> | References: <(E-Mail Removed)>
> <(E-Mail Removed)>
> | 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$(E-Mail Removed)>
> | 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" <(E-Mail Removed)> wrote in
> | message news:(E-Mail Removed)...
> | > What oblect is the data source?
> | >
> | > --
> | > Eliyahu Goldin,
> | > Software Developer
> | > Microsoft MVP [ASP.NET]
> | > http://msmvps.com/blogs/egoldin
> | > http://usableasp.net
> | >
> | >
> | > "Nick" <(E-Mail Removed)> wrote in message
> | > news:(E-Mail Removed)...
> | >> 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.
> | >>
> | >
> | >
> |
> |
> |
>



 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      10-24-2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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 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 Removed).
>>
>> ==================================================
>> 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" <(E-Mail Removed)>
>> | References: <(E-Mail Removed)>
>> <(E-Mail Removed)>
>> | 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$(E-Mail Removed)>
>> | 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" <(E-Mail Removed)> wrote in
>> | message news:(E-Mail Removed)...
>> | > What oblect is the data source?
>> | >
>> | > --
>> | > Eliyahu Goldin,
>> | > Software Developer
>> | > Microsoft MVP [ASP.NET]
>> | > http://msmvps.com/blogs/egoldin
>> | > http://usableasp.net
>> | >
>> | >
>> | > "Nick" <(E-Mail Removed)> wrote in message
>> | > news:(E-Mail Removed)...
>> | >> 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.
>> | >>
>> | >
>> | >
>> |
>> |
>> |
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Triggering an UpdatePanel with a trigger located outside of the UpdatePanel Nathan Sokalski ASP .Net 1 06-15-2009 06:23 PM
UpdatePanel only updates once Scott M ASP .Net 4 01-14-2009 05:40 PM
UpdatePanel only updates once Scott M ASP .Net 0 01-13-2009 08:52 PM
GridView: sort && avoid outdated data && trip to database only once DC ASP .Net 2 02-11-2008 05:54 PM
refresh an updatePanel in an other updatePanel fran_j_diaz@yahoo.fr ASP .Net 3 08-08-2007 06:30 AM



Advertisments