Click here to Skip to main content
15,889,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I just wonder my binding navigator plus is disable, any any one can help me please?

Here is my class:
VB
Interface DIc
    Property meaning() As String
    Property word() As String
End Interface

<serializable()> Public Class Class1
    Private word As String
    Private meaning As String
    Public Sub New(ByVal cWord As String, ByVal cMeaning As String)
        word = cWord
        meaning = cMeaning
    End Sub
    Public Property pWord() As String
        Get
            Return Me.word
        End Get
        Set(ByVal value As String)
            Me.word = value
        End Set
    End Property
    Public Property pMeaning() As String
        Get
            Return Me.meaning
        End Get
        Set(ByVal value As String)
            Me.meaning = value
        End Set
    End Property
    Public ReadOnly Property Full() As String
        Get
            Return Me.word & " " & Me.meaning
        End Get
    End Property
End Class

and this is my form code
VB
Imports ClassLibrary1.Class1
Imports ClassLibrary1
Imports System.IO


Public Class Form1
    Dim bf As New BinaryFormatter
    Dim Ar As New ArrayList
    Dim BS As New BindingSource
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Ar.Add(New Class1(TextBox1.Text, TextBox2.Text))
        Ar.Add(New Class1("B", "kidsfjao"))
        bs.DataSource = Ar

        ComboBox1.DataSource = bs
        ComboBox1.DisplayMember = "pWord"
        TextBox2.DataBindings.Add("Text", bs, "pMeaning", True)
        BindingNavigator1.BindingSource = bs
       
    End Sub
End Class
Posted
Updated 11-Mar-12 3:26am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900