I have an application that uses the new bindingsource class (part of the V2 framework).
In addition, I'm binding the enabled property of certain buttons to properties of a wrapper class that I've written around the bindingsource. Most is working fine, but having difficulty with a couple of them.
I have my "Save" button enabled property bound to a property on the wrapper called CanEndEdit. When I step through the code, I know the property is returning a value at the correct time, but unless I've fired the AddNew method, it always returns false.
Here is the code
Basically the rowstate is returning as unchanged even though I know that changes have occurred?
In addition, I'm binding the enabled property of certain buttons to properties of a wrapper class that I've written around the bindingsource. Most is working fine, but having difficulty with a couple of them.
I have my "Save" button enabled property bound to a property on the wrapper called CanEndEdit. When I step through the code, I know the property is returning a value at the correct time, but unless I've fired the AddNew method, it always returns false.
Here is the code
Code:
Public ReadOnly Property CanEndEdit() As Boolean
Get
If Not mBindingSource.Current Is Nothing Then
Return DirectCast(mBindingSource.Current, DataRowView).Row.RowState <> DataRowState.Unchanged
Else
Return False
End If
End Get
End Property
Basically the rowstate is returning as unchanged even though I know that changes have occurred?