Gridview not updating on edit

Posted by / 17-Sep-2020 04:17

Gridview not updating on edit

I am using a Paged Collection View or Observable Collection to bind data to Rad Grid View.

In this article we will look at how to update or delete a record in a database table using a Grid View control.

Then again we have to call that Bind Grid Data () method to bind data for the textboxes.

So once after done with editing data, if we click update the following method will be triggered. Once we access the required fields in the code behind, we need to update the data in the database and show the updated data to the user. If the user clicks the Delete button On Row Deleting event will be fired.

You can see the C# code below will give the row number whatever you are editing by New Edit Index property.

But after I update, the changes are not reflected in the Rad Grid View.

On click of the button, I am calling a Delegate Command to do the action.

I am passing the current row as the Command Parameter of that button.

To avoid this we need to keep the property Read Only as false, Then in the edit mode nothing will happenes. The reason I use Template Field instead of Bound Field is that, it is very easy to grab those controls in the codebehind if we user labels or textboxes.

In case of the bound field’s we need to check what column it is and need to use index of that cloumn, which is little hard and even in future if we change the column order If you see the Last Template Field part in the above code, I am using the link buttons for edit, update, delete and cancel.

gridview not updating on edit-2gridview not updating on edit-90gridview not updating on edit-52

One thought on “gridview not updating on edit”

  1. Tap the “matches” option to browse, which, oddly, does not show you the people you’ve matched with but rather the people you could potentially match with.

  2. So, we keeping things simple and clean inside our page and making it more user-friendly for all chatters. You can access our site from anytime anywhere from this world or other world Once we land and colonize on mars.