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

GridView in UpdatePanel only Updates once

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


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

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

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

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

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

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

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.