I have a form that on load, the gidview is blank but is tied to a back end sqlDB. Through other controls on the form I can populate the SQL DB but the data grid will not "Refresh" so it will then appear on the page. How can I tell the grid view to go grab the
new data?
bflagg
Member
19 Points
73 Posts
blank gridview and refresh
May 02, 2012 01:08 AM|LINK
basheerkal
Star
10672 Points
2426 Posts
Re: blank gridview and refresh
May 02, 2012 04:36 AM|LINK
Generally for a GridView to display data, it should have a datasource set and it should be databound..
Your context is not well explained. Will you please make it more specific.?
B
(Talk less..Work more)
boonmathew
Member
96 Points
56 Posts
Re: blank gridview and refresh
May 02, 2012 05:18 AM|LINK
If you want to refresh gridview and Sql datasource in a button click? then give following command in button click event.
SqlDataSource1.DataBind();
GridView1.DataBind();
bflagg
Member
19 Points
73 Posts
Re: blank gridview and refresh
May 02, 2012 03:49 PM|LINK
gridview.databind(); was it....
thank you