Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataGrid and Repeater strange disappearance bug

Reply
Thread Tools

DataGrid and Repeater strange disappearance bug

 
 
Kepler
Guest
Posts: n/a
 
      11-02-2004
I'm fighting a really strange bug that involves both a DataGrid and a
Repeater disappearing on postback. The strange thing is that I've
distilled the problem down to a simple program, that originally could
reproduce the problem, but now can't, even as I add complexity back
in.

The basic scenario is a custom DataGrid (just make a class that
derives from DataGrid) that has a LinkButton in a HeaderTemplate that
has a CommandName="sort" and CommandArgument="whatever". Only
DataBind if it's not a postback, and there you go. (I can give more
code later). It's actually a bit more complicated in that sorting and
paging are handled mostly within the control. I've intercepted almost
all the handlers I can to see what is different between the working
version and the non-working version (sometimes just a difference in
time of day it seems). Here's what I found.

Postback (when it's working):
grid OnInit
page OnInit
grid LoadViewState
grid CreateControlCollection
grid InitializeItem
page OnLoad
grid OnLoad
OnSortCommand

Postback (when it doesn't work - and DataGrid disappears):
grid OnInit
page OnInit
grid CreateControlCollection
grid LoadViewState
page OnLoad
grid OnLoad

The actual control is IDENTICAL in both cases. I'm pulling my hair
out to figure out what is possibly different. This problem is driving
me crazy, especially since I originally duplicated the problem in a
simplified test case. Once I changed a small something that caused
the problem to go away in the test case, I then went and changed it
back, and WHAMMO, it didn't happen again. In fact, I can't get it to
happen at all in my test case again, even though all the code is
almost a duplicate of my bigger app. Any leads at all will be greatly
appreciated. I'll post more code tomorrow.
 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      11-02-2004
Hi Tim:

I think we will need to see some more code. When you do the sorting,
is there any possibility you could be binding to an empty DataSource?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 1 Nov 2004 21:17:03 -0800, (Kepler)
wrote:

>I'm fighting a really strange bug that involves both a DataGrid and a
>Repeater disappearing on postback. The strange thing is that I've
>distilled the problem down to a simple program, that originally could
>reproduce the problem, but now can't, even as I add complexity back
>in.
>
>The basic scenario is a custom DataGrid (just make a class that
>derives from DataGrid) that has a LinkButton in a HeaderTemplate that
>has a CommandName="sort" and CommandArgument="whatever". Only
>DataBind if it's not a postback, and there you go. (I can give more
>code later). It's actually a bit more complicated in that sorting and
>paging are handled mostly within the control. I've intercepted almost
>all the handlers I can to see what is different between the working
>version and the non-working version (sometimes just a difference in
>time of day it seems). Here's what I found.
>
>Postback (when it's working):
>grid OnInit
>page OnInit
>grid LoadViewState
>grid CreateControlCollection
>grid InitializeItem
>page OnLoad
>grid OnLoad
>OnSortCommand
>
>Postback (when it doesn't work - and DataGrid disappears):
>grid OnInit
>page OnInit
>grid CreateControlCollection
>grid LoadViewState
>page OnLoad
>grid OnLoad
>
>The actual control is IDENTICAL in both cases. I'm pulling my hair
>out to figure out what is possibly different. This problem is driving
>me crazy, especially since I originally duplicated the problem in a
>simplified test case. Once I changed a small something that caused
>the problem to go away in the test case, I then went and changed it
>back, and WHAMMO, it didn't happen again. In fact, I can't get it to
>happen at all in my test case again, even though all the code is
>almost a duplicate of my bigger app. Any leads at all will be greatly
>appreciated. I'll post more code tomorrow.


 
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
delay and disappearance for jPopUPMenus onetitfemme Java 0 09-16-2006 11:20 AM
Viewstate Disappearance Will Lastname ASP .Net 7 09-22-2005 02:51 PM
Disc Disappearance CarlO Computer Support 7 05-17-2005 01:41 PM
Bookmark Icon Disappearance ric Firefox 1 04-09-2005 10:07 AM
Wilner's Bizarre Disappearance.. Max Christoffersen DVD Video 125 02-09-2004 07:36 PM



Advertisments