G
Guest
Hi,
I am binding the controls on my form as follows:
txtTextbox1.DataBindings.Add("Text", ds, "Table1.Field1")
I have a function called AddRow() then adds a new to the table and tries to
set the position of the binding context to the next new as follows:
Public Sub AddRow()
Me.BindingContext(ds, "Table1").EndCurrentEdit()
Dim dr As DataRow = ds.Tables("Table1").NewRow()
dr.Item("mod_user_name") = strUserID
dr.Item("mod_date_time") = Now
ds.Tables("Table1").Rows.Add(dr)
Me.BindingContext(ds, "Table1").Position = ds.Tables("Table1").Rows.Count
- 1
End Sub
But for some reason, the value of Me.BindingContext(ds, "Table1").Position
does not change. It remains set at 0 at all times.
Does anyone know why this is happening?
Thanks,
Parveen
I am binding the controls on my form as follows:
txtTextbox1.DataBindings.Add("Text", ds, "Table1.Field1")
I have a function called AddRow() then adds a new to the table and tries to
set the position of the binding context to the next new as follows:
Public Sub AddRow()
Me.BindingContext(ds, "Table1").EndCurrentEdit()
Dim dr As DataRow = ds.Tables("Table1").NewRow()
dr.Item("mod_user_name") = strUserID
dr.Item("mod_date_time") = Now
ds.Tables("Table1").Rows.Add(dr)
Me.BindingContext(ds, "Table1").Position = ds.Tables("Table1").Rows.Count
- 1
End Sub
But for some reason, the value of Me.BindingContext(ds, "Table1").Position
does not change. It remains set at 0 at all times.
Does anyone know why this is happening?
Thanks,
Parveen