M
Malcolm Busfield via .NET 247
Hi
I am trying to bind a dataview to a number of textboxes, comboboxes and my own control, which contains 2 radio buttons and I am using the currency manager to hold it all together. I bind to the default view of the dataset and i just look at the first row.
I am having problems in that the dataset.haschanges property is set to true when i have not made any changes. I removed the binding of my own control and everything is ok. Does there need to be anything special about the property you bind to?
Code:
In screen close event (I set the position of the currency manager to itself as it seems to help the dataset understand if it has changed):
currencym.Position = currencym.Position
If ds.HasChanges Then 'the dataset has changed
msgbox "Changes have not been saved"
Code to bind the property:
ynQuestion.DataBindings.Add("questionvalue", dv, "question")
Property from control:
Public Property QuestionValue() As Boolean
Get
Return optYes.Checked
End Get
Set(ByVal Value As Boolean)
If Value Then
optYes.Checked = True
Else
optNo.Checked = True
End If
End Set
End Property
Thanks in advance for any help
I am trying to bind a dataview to a number of textboxes, comboboxes and my own control, which contains 2 radio buttons and I am using the currency manager to hold it all together. I bind to the default view of the dataset and i just look at the first row.
I am having problems in that the dataset.haschanges property is set to true when i have not made any changes. I removed the binding of my own control and everything is ok. Does there need to be anything special about the property you bind to?
Code:
In screen close event (I set the position of the currency manager to itself as it seems to help the dataset understand if it has changed):
currencym.Position = currencym.Position
If ds.HasChanges Then 'the dataset has changed
msgbox "Changes have not been saved"
Code to bind the property:
ynQuestion.DataBindings.Add("questionvalue", dv, "question")
Property from control:
Public Property QuestionValue() As Boolean
Get
Return optYes.Checked
End Get
Set(ByVal Value As Boolean)
If Value Then
optYes.Checked = True
Else
optNo.Checked = True
End If
End Set
End Property
Thanks in advance for any help