jax
jax

Reputation: 38643

GridView, RowDataBound event executing twice for each row

I have a GridView that is using an SQLDataSource to bind to a database.

For some reason my RowDataBound event on the GridView is executing twice.

Why is this happening?

Upvotes: 0

Views: 1980

Answers (1)

jax
jax

Reputation: 38643

It appears that if you enable the Footer in your GridView from your code behind (gv.ShowFooter = true;) and it was not previously set to true, it will rebind the data. This seems like a bug to me!

Instead I enabled the footer in my .aspx file and all is good.

Upvotes: 1

Related Questions