Re: Event on record change by Cor
Cor
Thu Feb 17 06:12:36 CST 2005
News,
Your first question when it is for the datetimepicker (not tested with a
datetimepicker however I don't know why it would not
\\\
Private Sub myroutine()
Mybinding = New Binding("Value", ds.Tables(0), "mydatfield")
textdatfield.DataBindings.Add(Mybinding)
AddHandler mybinding.Format, AddressOf DBdateTextbox
AddHandler mybinding.Parse, AddressOf TextBoxDBdate
End sub
Private Sub DBdateTextbox(ByVal sender As Object, _
ByVal cevent As ConvertEventArgs)
If cevent.Value Is DBNull.Value Then
cevent.Value = ""
Else
Dim datum As Date
datum = CDate(cevent.Value)
cevent.Value = datum.ToString("d")
End If
End Sub
Private Sub TextBoxDBdate(ByVal sender As Object, _
ByVal cevent As ConvertEventArgs)
If cevent.Value.ToString = "" Then
cevent.Value = DBNull.Value
End If
End Sub
///
For the secondone you have to create for every control a different dataview
When you don't know how tell than what is your datasource at the moment.
I hope this helps?
Cor