Wednesday, March 13, 2013

SelectedIndexChanged firing on DataBind?

As I was looking into a GridView issue today, I came across this teeny, tiny tip. And in the back of my mind, I know this has been a problem for me sometimes, but I did not know it until I saw this posted:
Try assigning the "DataTextField" and "DataValueField" before you assign the DataSource. Doing so will prevent firing the "SelectedIndexChanged" event while databinding...
If this tip is right, BRILLIANT!

1 comment: