Ciao,
I'm a bit disappointed with my incapacity to deal with this, there must be a simple way but I can't find it.
I'm making it simple:
I have a typed dataset with two columns.
I bound the two columns on a windows form with a combobox and a textbox
I have a button on my form which is performing an addnew on the dataset.
I'm managing the columnchanging event on the dataset to obtain this:
whenever column A value is changed using the combobox column B is updated.
Seems easy, but what happens is that the textbox on the form is not refreshed.
Below you can find the code of the columnchanging event:
-
Private Sub TestataDataTable_ColumnChanging(ByVal sender As System.Object, ByVal e As System.Data.DataColumnChangeEventArgs) Handles Me.ColumnChanging
-
If (e.Column.ColumnName = Me.IDDocumentoColumn.ColumnName) Then
-
'Add user code here
-
End If
-
-
If (e.Column.ColumnName = Me.TipoDocumentoColumn.ColumnName) Then
-
If e.Row.HasVersion(DataRowVersion.Current) Or e.Row.HasVersion(DataRowVersion.Proposed) Then
-
If e.ProposedValue <> e.Row.Item(e.Column, DataRowVersion.Proposed) Then
-
If e.ProposedValue <> "0" Then
-
e.Row.Item("NumeroDocumento") = DocMethods.GetNewDocNumber(e.ProposedValue, e.Row.Item("DataDocumento"))
-
End If
-
End If
-
Else
-
If e.ProposedValue <> "0" Then
-
MsgBox("pluto")
-
End If
-
End If
-
End If
-
-
End Sub
-
Why I am no able o refresh the textbox?
Thanks in advance,
Pino