I have tried updating the datagridview directly using this code: dgv Tasks. Rather I would change the value in the table frequently and update the database once the increments stops. Updating the endtime would be the way to go - then your computed column will update too. Finally however, the simplest approach would be to update the datatable - Why can't you do that?The reason for wanting to do this is that I have a list of records with a start and end time and there is a computed field that gives the difference in seconds. There are plenty of possible paths to solve your problem but it still isn't clear exactly what the problem is.I need to change the value of the computed field and change the height of the row accordingly, that is, the height of each row is proportional to the duration it represents. I have a list of records with a start and end time and the computed field is the difference in seconds.When the user clicks the "Select Facility" button, you would like to clear the Data Grid View of the data from the previous facility (and not throw an error if it's his first selection).In this scenario, you can achieve the clean Data Grid View by adapting the generated code that fills the Data Grid View.
Data Source = data Stuff End Sub End Class I had the same problem on gridview content clearing.The following source code illustrate how to connect a Data Grid View to a database and addnew/update or delete the database values from Data Grid View. Full Row Select End Sub Private Sub new_btn_Click(By Val sender As System. I wanna clear the content and then add the values.. For library code clear all the columns before adding columns. Data Source = Nothing End Sub Private Sub Form1_Load(By Val sender As System. db Data Set must be at the start of the form within the Public Class Form You may have a user scenario such that you want to keep the data binding and only temporarily clear the Data Grid View.To remove the old record in datagridview when you are searching for new result,with button_click event write the following code, me. Data Source.clear() this code will help to remove the old record in datagridview. For instance, you have the user click on a facility on a map to show its attributes for editing.Those last few points seem to represent a drastic departure from the way forms and controls work!