Gridview is not updating

Posted by / 24-Mar-2017 16:26

Gridview is not updating

This leads me to beleive there is something going on with the Selected Index value, or something funny like that. I have spent the past week tracking this problem and narrowed it down to a missing entry in the Grid View, the "Data Key Names" entry. Finally, I noticed that there was no Initially I used Bound Field and the update was working GOOD but it allowed editing the entire three fields. I'm taking the Beginning Tutorials to get my feet wet (again) after being out of . The Beginning Tutorial Videos keep you out of the code as much as possible and they've never covered "datakeys" or other modifications to the code. NETDEVFX.v20.en/cpref16/html/P_System_Web_UI_Web Controls_Sql Data Source_Update and looked at the code sample for ODBC.

Partial Code for row updating is also getting old value for quantity protected void GVInvoice Det_Row Updating(object sender, Grid View Update Event Args e) { Grid View temp = (Grid View)sender; //Get the values stored in the text boxes string item Code = ((Text Box)temp.

By default, the Text Boxes have no validation controls associated with them, but your business rules might require certain validation.

A particular field may be required or might need to be entered in a specific format.

didn't I create a database and totally duplicate YOUR grid so there could be a few other things wrong. I have everything that is talked about even the Data Key Name but still nothing gets updated. Hi All, I've had the exact same problem and came across a post on this site mentioning that if you have NULL fields in your data and checked the "Use Optimistic Concurrency" option when configuring your Sql Datasource, then the update won't work. Unfortunately, turning off Use Optimistic Concurrency kind of defeats the safeguard it provides and allows one user to clobber another user's data. I do not know what I have missed or where I have gone wrong.

However, I discovered that if you change the Sql Data Source1 control to add or delete columns, a dialog pops asking if you want to "Refresh the Fields and Keys ..." This is where the problem occurs since it clears the Data Key Names entry (the pop-up tells you that, but who read the fine print? Also, you may not want a Drop Down List in the Item Template, but may want to leave it alone as a label and Eval it to the field to which the licensee_id field points. Of course Scott Mitchell has a bunch of online tutorials, although I somehow missed this I am having the same problem but can not get it to work. I was having the exact error until a few moments ago, but I finally got it[:)]. I am using My Sql as the back end.) and here it shows the new or the edited value.

gridview is not updating-13gridview is not updating-75gridview is not updating-13

This will add a Command Field to the Grid View with an Edit button.