How to edit row in a DataView

The DataView provides different views of the data stored in a DataTable. DataView can be used to sort, filter, and search a DataTable , additionally we can add new rows and modify the content in a DataTable. We can create DataView in two ways. Either we can use the DataView Constructor , or we can create a reference to the DefaultView property of the DataTable. Also we can create multiple DataViews for any given DataTable. Using a DataView, you can expose the data in a table with different sort orders, and you can filter the data by row state or based on a filter expression.

We can update the data in a DataView . The following C# source code shows how to update data in a DataView . Create a new C# project and drag a DataGridView and a Button on default Form Form1 , and copy and paste the following C# Source Code on button click event.