I’m trying to bind the BindingNavigator to a BindingSource. It works very good, but the problem is the yellow plus icon is disabled. How can I make it enabled?
I created manually with code the dataset, tableadapters and the bindingsource, but when I bind it on the bindingnavigator it shows the records but it doesn’t enable “Delete” and “Add Item”.
What im doing wrong?
Code from comment:
Dim connstr As String = "Data Source=" + Application.StartupPath + "\Prueba.sdf"
Dim conn As New SqlCeConnection(connstr)
Dim cmd As New SqlCeCommand("SELECT * FROM datos", conn)
Dim inscmd As New SqlCeCommand("INSERT INTO datos VALUES (@nombre,@apellido,@id)", conn)
dt = New SqlCeDataAdapter(cmd)
dt.Fill(DataSet1, "datos")
dt.InsertCommand = inscmd
BindingSource1.DataSource = DataSet1
DataGridView1.DataSource = BindingSource1
DataGridView1.DataMember = "datos"
DataGridView1.Columns("id").Visible = False
Since you provided no code, you made it really hard to try to solve your problem.
Here is an example that works. Take a new form, drop a
TextBoxandBindingNavigatorcontrols on it.Add this code:
The
TextBoxshould have “Hello” in it. TheBindingNavigatorshould have “1 of 2” on it, plus the Add and Delete buttons should be enabled and working.If this doesn’t help solve the problem, you will have to post some code to help us reproduce the problem.