Gridview values not updating
Now you can ask questions directly to me on my new site ASPForums. Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.I don't know why yet, or how to bind the page..if I remove Data Bind from Page_Load, updating is successful. This means fresh data is retrieved from the database as soon as the page loads. Is Post Back) This way, Data Bind is only called when the page initially loads and leaves your edits alone on postback. Get the data from your database using a sqldatareader and store it in a custom collection by defining your own custom object.This in turn means any customizations to the data (e.g. To avoid that problem, wrap the call to Data Bind in a check for Posat Back. Hope this helps, Imar --------------------------------------- Imar Spaanjaars Then bind to the collection using the pageload event and when page.ispostback = false.
If refreshing cells meets your needs, then don't use redraw rows.To deal with the scenario where the row data is changed without the grid been aware, the grid provides the following methods: Each parameter is optional.The simplest is to call with no parameters which will refresh all cells using change detection (change detection means it will only refresh cells who's values have changed).whenever i delete, insert or update my datasource, gridview does not refresh.
However, when i manually refresh my page, then it does.
How to make it such a way that it refreshes by it's own whenever I insert,delete or update anything from my datasource.