A Programmer's Dream

What happened to my gridview buttons?

Posted by Stephen Wrighton on 25 Jun 2007

Argh, I have a website I'm working on. The website is broken into functional components (such as a page to deal with courses and a page to deal with events and so on), and these pages deal with every aspect of those components (adding, editing, listing, etc).

Well since I needed to be able to jump from one component to the other, I used query string variables to control which page I was on.

Not a big deal, it's an old technique which works. I could have just as easily used POST commands, but frankly, this works better as those query string variables can be bookmarked by the user.

Well, for whatever reason, the click events for some LINKBUTTONS in my GRIDVIEW aren't working. I don't know why, there's no reason why they shouldn't. They just don't work. It annoys me to no end.

I have the buttons defined properly. I have the GRIDVIEW defined properly. I've even got the GRIDVIEW RowCommand event handler defined properly, but for whatever reason, the thing just doesn't want to work.

Time to go smack my head against the wall for a bit, I guess.

EDIT: I meant to update this the other day, but I finally figured out what it was. The PANEL which held the GridView had the EnabledViewState attribute set to False.

Tweet me @kidananubix if you like this post.