G
George
Hi,
I'm changing the value of a cell in a bound datagrid to the path to a
selected filename. However this change is only saved if I click in a
different row in the datagrid afterwards.
How can I force this change to be saved?
The code I'm using to change the value of a cell follows:
Dim myCell As DataGridCell
Me.OpenFileDialog1.Filter = "Microsoft Access (*.mdb) | *.mdb"
If Me.OpenFileDialog1.ShowDialog = DialogResult.OK Then
myCell = Me.dgDatabases.CurrentCell
Me.dgDatabases(myCell) = Me.OpenFileDialog1.FileName
End If
This code works, but the change is only saved if I click a different row
afterwards.
Also, if I edit a cell manually, a pencil appears, but not when using
the above code.
Kind regards,
George
I'm changing the value of a cell in a bound datagrid to the path to a
selected filename. However this change is only saved if I click in a
different row in the datagrid afterwards.
How can I force this change to be saved?
The code I'm using to change the value of a cell follows:
Dim myCell As DataGridCell
Me.OpenFileDialog1.Filter = "Microsoft Access (*.mdb) | *.mdb"
If Me.OpenFileDialog1.ShowDialog = DialogResult.OK Then
myCell = Me.dgDatabases.CurrentCell
Me.dgDatabases(myCell) = Me.OpenFileDialog1.FileName
End If
This code works, but the change is only saved if I click a different row
afterwards.
Also, if I edit a cell manually, a pencil appears, but not when using
the above code.
Kind regards,
George