Cannot escape blank textbox Databinding with class property

  • Thread starter Thread starter Shan1986
  • Start date Start date
S

Shan1986

Guest
Hallo,

I have a class and it has a property something like this

Public Class Person

Private AgeValue As Integer

Public Sub New()

End Sub


Public Property Age() As Integer
Get
Return AgeValue
End Get
Set(ByVal value As Integer)
AgeValue = value
End Set
End Property

End class

Public Class People
Inherits System.ComponentModel.BindingList(Of Person)
End Class




i am binding with BS_people and

tbx_Name.DataBindings.Add("Text", BS_people , "Name", True, DataSourceUpdateMode.OnPropertyChanged, "")

i also tried string.empty , DBnull.value but i can not leave the textbox empty.


Any workaround? thanks.

Continue reading...
 
Back
Top