I set up a test page that is from an actual project page stripped down to just enough to demonstrate my problem. Here's the link.
To see what I mean, go to the link and observe how clicking on the top table's rows toggles displaying that row's textboxes and then labels, alternately. Note how clicking on the Cancel button makes both rows show the labels.
The bottom table behaves the same when you click on its rows. But the problem rears its ugly head when you click on the Cancel button in the bottom table. Instead of just hiding that row's textboxes, the page actually refreshes.
I've spent HOURS on this and I can't for the life of me figure out what's going on, nor how to fix it.
I'd really appreciate it if someone could take a look at this and help me figure out what's going on.