A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled.To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source.
Place Link Button Edit in Item Template and Link Button Update and Cancel in Edit Tamplate of Gridview's column. Fire Grid View's Row Editing event for Link Button Edit. Fire Grid View's Row Updating event for Link Button Update. Fire Grid View's Row Canceling Edit event for Link Button Cancel. Set Command Name propery of Link Buttons according to their respective event. Set Grid View's Data Key Names Property to record ID (ID=Primary/Unique key of student table) 7.
If we move our mouse on to the variables, which hold the cell values, we can see the old value instead of new updated value (Refer the debugging Screen Shot at the Top).
event is raised when a row's Update button is clicked, but before the Grid View control updates the row.
This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.
If the underlying data is in a database, simply rebind the grid from the data source (after updating it), i.e.
refresh it from sql server/whatever your data source is.
If its bound to the database, you should have a method that fetches the data to be bound correct?
You will need to basically execute the same call that initially populates the grid.
Also when you save the new value, you have to persist those changes to the database as well. The update is done automatically on the Update Command command which is set on the Sql Data Source , isn't it ?
If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.
If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.