Gridview updating new values dating aquarius expect
The code below shows me the values in the Drop Down List, but when I update it with the “edit” of the Grid View row, the value does not get saved.Here is the code and what it looks like running: Notice that even though I’m using Bind rather than eval, the value does not stick. Count ----------- The most common problem for losing new data entered while updating a Grid View or Data Grid is that you are resetting the Data Source for the Grid View or Data Grid in the Page_Load method. I actually don't know how to write the Row Updating function, I just found it from the internet, and so of course it's not working.This article explains how to send Grid View row values to another page and update the record values and return to the original Grid View page using ASP. Well, we always have a reason so I believe it is not working because Selected Value only has a Get (it’s read only) and the value can not be put back.So, the solution that works for me is to program the Grid View’s Updating Row Event.
If you reset the Data Source at this stage, your values for updating will be lost. I actually don't know how to write the Row Updating function, I just found it from the internet, and so of course it's not working. Please give some references and/or details of how to. Ok what's happening is that you are binding the data source for the Grid View every time a postback occurs in the Page_Load method.
In this article, I am going to explain how to insert, update or delete a row from a grid view control. At run time, the Eval method calls the Eval method of the Data Binder object.
If you are new to using a grid control, I would recommend you to read my blogs “Using Grid View in ASP. The Eval method takes the name of a data field and returns a string containing the value of that field from the current record in the data source.
From this article, you will have a clear view of the Grid View data insert, delete, and update operations.
Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers.