If you show the data then gridview then you can save the changed value in database, for that you can use 'CellValueChanged' event
see below snippet
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e){
if(dataGridView1.Columns[e.ColumnIndex].Name == "Reference"){
}
}
OR 'CellEndEdit' will also works for you
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e){
if(dataGridView1.Columns[e.ColumnIndex].Name == "Reference"){
}
}
in above example 'reference' is the column name for an example.
hope it helps