Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

ive a gridview m binding it with controls like textbox and dropdownlist, my problem is gridview is not refreshing after inserting, for every click ive to do refreshing..can anybody know please let me know
Posted

you have to again bind the data to gridview after inserting or updating a row so it will get refreshed
 
Share this answer
 
You need to bind the gridview with the latest datasource at each modification.
Try this:

C#
GridView1.DataSource = ds;
  GridView1.DataBind();


and check this out:

Refresh a GridView control on the parent page, from a pop up window[^]

hope it helps :)
 
Share this answer
 
You must after inserting to table run this code:
GridView1.DataBind();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900