c# - Gridview Update -
when gridview data update in other forms data update when close form gridview data refresh not response automatically in c# win-forms application here code:
private void button1_click(object sender, eventargs e) { acatagory=new tbl_catagory(); acontext = new rm_inventory_datacontext(); var product = (from p in acontext.tbl_catagories p.catagoriesid == convert.todecimal(textbox1.text) select p).single(); product.catagoriesname = textbox2.text; acontext.submitchanges(); this.close(); addcatagories addcatagories=new addcatagories(); addcatagories.gridview(); } public void gridview() { gridcontrol1.datasource = new rm_pm_inverntory_management_system.rm_inventory_datacontext().tbl_catagories; }
you not binding gridview after assigning datasource.
public void gridview() { gridcontrol1.datasource = ever data source have gridcontrol1.databind(); }
Comments
Post a Comment