Hi,
I have a grid with 2 columns needs to have synchronized values.
So for example, if a user changes the value of a cell of column A to 12.50, the value of the cell of column B has to change to 12.50 as well.
I currently use a gridNumericTextBox as the editor of both columns. To capture changes made by the use, i use the textbox’s OnLostFocus event.
When LostFocus triggers, my event handler would get the current row and update column B with column A’s value.
The problem however happens when LostFocus triggers as the user clicks on another row instead of the row that the user was editing.
My event handler in this case updates the ‘clicked’ row instead of the row that was being edited. This is because the current row is the ‘clicked’ row now.
I want the edited row to be updated instead of the ‘clicked’ row .. any ideas how i can do this?
Any help is appreciated … THANKS!!
============================
grdCharges.Columns(0).CellEditor = gTxtChargePerUnit
Private Sub gTxtChargePerUnit_Event(ByVal sender As System.Object, ByVal ne As System.EventArgs) Handles gTxtChargePerUnit.TextChanged
Dim currRow As Xceed.Grid.DataRow = CType(grdCharges.SelectedRows(0), Xceed.Grid.DataRow)
currRow.Cells(1).Value = gTxtChargePerUnit.Text
End Sub
Imported from legacy forums. Posted by stktung (had 2616 views)