.net is a wonderful thing.
The Visual Studio 2005 IDE is a wonderful thing.
All those easily settable properties, intellisense...all are (repeat after me) Very Good Things.
Of course, they still don't always save the occasional bonehead miss.
So I've been trying to get (for a day and a half) a footer to display in an asp.net gridview.
You know the drill...gridviews don't allow you to create (insert) records by default. Given that this is a pretty common theme, there are quite a few tutorials out there on how to do it.
Ok, now get this. In the app I'm working on? I already had done this for a different gridview. (a week or two ago.) Worked great.
Followed the same steps. Compile. Run.
No footer.
Records show up. Paging numbers. All that good stuff.
No footer.
Hmm...maybe I need to change ALL the columns to template fields.
Nope.
Umm...put in a text field bound to the identity and make it hidden?
Uh-uh.
Oh yeah...I need to embed a formview in the footer, bind it to the same data source and...uh...
No.
Crap. What the confounded tarnation of all that is good and ... oh. Wait.
Maybe you just need to set the "showfooter" property of the gridview to "true".
Yeah. That'll do it.
[blushes furiously]
On the plus side, the odds of me EVER repeating this mistake (and the attendant pounding of the head on formica) is now pretty minuscule. Pain. It's a wonderful teacher.
Wednesday, October 17, 2007
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment