Monday, September 15, 2008

Extending bound field may not be what you want

I read an article by Oscar Peli on extending the bound field class and I thought it would be a great way to put some order into my grid views by enabling validation. It turns out, that's not such a good idea and it's better to stick with the plain ol' "Convert to Template Field" option that the GridView column editor gives you.

When I replaced the bound fields in my class with an extended version that added validators, I couldn't even click on the Edit link next to the data as that would cause a validation and the validation error resulting from it would prevent the gridview from switching to edit mode.

Perhaps it's because my GridView is in an UpdatePanel?

No comments: