Tuesday, April 25, 2006

Nested Repeater Control Update

Back in January I posted about a Expanding Nested Repeater control I had developed.  Well I ran into some difficulties with it right after I launched it...actually the problem was always there I just didn't realize it.

For some reason that was unknown to me at the time the sub menu was skipping every other row of data that was getting returned from the database.  I spent hours looking at it and was literally beating my head trying to figure it out.

I left it alone for a while.  And I looked at it again last night.  Stepping through the code for the first time it hit me right in the face.  As I was going through the repSubMenu_ItemDataBound method I realized that I was not testing for e.Item.ItemType == 'AlternateItem' I was only testing for e.Item.ItemType == 'Item'.

I just needed to alter my if statement to check to see if Item OR AlternateItem.  I am glad I finally fixed it but holy crap that frustrated the hell out of me.

It's funny though how fast I found the bug after I set it aside for a while.   That always seems to happens.

Friday, July 20, 2007 3:18:13 AM (Eastern Daylight Time, UTC-04:00)
asdas
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u)  

Enter the code shown (prevents robots):

Blog Posts by:

Currently Viewable:

My Twitter Updates

View Twitter Page