Aspxgridview not updating

21-Dec-2014 04:09 by 6 Comments

Aspxgridview not updating - Cam free no credit card

hi all i have a grid view which get its values from some dropdownlists which are at the same page the dropdownlists insert thier values to the DB then i retrieve them to the grid view i made a button "add another" .. However the after the delete, the database are updated.which inster the values to the DB and clear the controls .. My gridview Auto Generate Column = False and my fields are checkboxfield, 3boundfield and 2hidden itemtemplate. There is a known issue where template fields are not restored from viewstate on postback Studio/feedback/details/104994/templatefield-in-a-gridview-doesnt-have-its-viewstate-restored-when-boundfields-are-inserted my solution was to add them in code behind This solution worked for me.

please help ;( hi guys thanx for the reply i'm binding the Grid View with an "Access Data Source".no code has been written yet what do you mean by "use the bind method"?? do u mean to write the Select code in the grid bind event ? Data Source = Get My Data(My String); //set the Data Source for the Gridview Some Gridview.hi thats the strange thing, i didnt change anything programatically ..... Data Source = My Binding Source; private static Data Table Get My Data(string sql Command) { Sql Connection my Connection = new Sql Connection(); my Connection. Fill(table); } catch (Sql Exception ex) { string msg = ex.i need to display the data after the insert command is done on the DB, i can use anything simillar to the gridview .. Connection String = "(your connection string goes here)"; my Connection. Databind(), the items in the gridview are still not being updated. After deleting records from it, and using Gridview1.Open(); Sql Command command = new Sql Command(sql Command, my Connection); Sql Data Adapter adapter = new Sql Data Adapter(); adapter.

Select Command = command; Data Table table = new Data Table(); table. Simply bind the selectedvalue property of the ddl to the correct column based on your update statement &/or if you are binding the grid in page_load make sure you do that inside of an if (! protected void Grid View_On Row Data Bound(object sender, Grid View Row Event Args e) { if (e. Data Row) { // initialize ddl in gridview Drop Down List ddl = (Drop Down List)e. Selected = true; } } protected void Grid View_On Row Updating(object sender, Grid View Update Event Args e) { Label lbl = (Label)Grid View. Find Control("lbl"); Drop Down List ddl = (Drop Down List)Grid View. Selected Value; }protected void Grid View_On Row Data Bound(object sender, Grid View Row Event Args e) { if (e.