Home All Groups Group Topic Archive Search About

Forcing SqlDataSource to fetch data

Author
31 Mar 2006 9:51 PM
Matt Colegrove
I'm trying to programatical switch between two GridViews, which have their
own SQLDataSouces configured.  I'm doing this when a RadioButton is changed. 
In the event handler for the RadioButtonList, I am changing the Visibility
property, but the data isn't always up to date.

How can I force the SqlDataSource to be rebound to the GridView so that the
current data is displayed when it becomes visible? 

I tried using issuing the command SqlDataSource.DataBind() at the event
handler for the RadioButtonList_SelectedIndexChanged event.  I probably need
to do this in a different page event.

Any suggestions?

AddThis Social Bookmark Button