Here is the error:
To reproduce this error, RadBindingNavigator control needs to be added to the form. Then add a label and try copy/paste it using context menu of the designer. The above error will appear.
So far, using Ctrl+C, Ctrl+V combination for copy/paste does not lead to this error and can be used as a workaround.
Follow the article to create a sample project:
https://docs.telerik.com/devtools/winforms/controls/bindingnavigator/getting-started
You will notice that the navigator remains empty.
Workaround:
Sub New()
InitializeComponent()
Me.CommandBarButton1.Name = "MoveFirstItem"
Me.CommandBarButton2.Name = "MovePreviousItem"
Me.CommandBarTextBox1.Name = "PositionItem"
Me.CommandBarLabel1.Name = "CountItem"
Me.CommandBarButton3.Name = "MoveNextItem"
Me.CommandBarButton4.Name = "MoveLastItem"
Me.CommandBarButton5.Name = "AddNewItem"
Me.CommandBarButton6.Name = "DeleteItem"
Me.CommandBarStripElement2.DisplayName = "SecondStrip"
Me.CommandBarStripElement1.DisplayName = "FirstStrip"
End Sub
Workaround: use bigger images public partial class Form2 : RadForm { public Form2() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.radBindingNavigator1.BindingNavigatorElement.MovePreviousItemButtonImage = Image.FromFile("MovePreviousItemButtonImage.png"); this.radBindingNavigator1.BindingNavigatorElement.MoveFirstItemButtonImage = Image.FromFile("MoveFirstItemButtonImage.png"); ; this.radBindingNavigator1.BindingNavigatorElement.MoveNextItemButtonImage = Image.FromFile("MoveNextItemButtonImage.png"); this.radBindingNavigator1.BindingNavigatorElement.MoveLastItemButtonImage = Image.FromFile("MoveLastItemButtonImage.png"); this.radBindingNavigator1.BindingNavigatorElement.AddNewButtonImage = Image.FromFile("AddNewButtonImage.png"); this.radBindingNavigator1.BindingNavigatorElement.DeleteButtonImage = Image.FromFile("DeleteButtonImage.png"); } }
To reproduce: please refer to the attached gif file and sample project. Workaround: public class CustomNavigator : RadBindingNavigator { public override string ThemeClassName { get { return typeof(RadBindingNavigator).FullName; } } protected override RadBindingNavigatorElement CreateNavigatorElement() { return new CustomNavigatorElement(); } } public class CustomNavigatorElement : RadBindingNavigatorElement { public void Attach() { this.AttachEvents(); } } private void radButton2_Click(object sender, EventArgs e) { SetNavigator(list1, this.radGridView1); this.radGridView1.DataSource = list1; SetNavigator(list2, this.radGridView2); ((CustomNavigatorElement)this.radBindingNavigator1.BindingNavigatorElement).Attach(); }
To reproduce: After upgrade from Q2 2014 SP1 to Q3 2014 some controls can not be selected design time because exception that RadBindingNavigator can not be cast to RadCommandBar.
To reproduce: Create a RadBindingNavigator, set its binding source and call the AddStandartItems method. You will notice that when you change the current position by clicking the buttons, two positions are being changed. Workaround: Use the following class: public class MyNavigator : RadBindingNavigator { protected override RadCommandBarElement CreateCommandBarElement() { return new MyNavigatorElement(); } } public class MyNavigatorElement : RadBindingNavigatorElement { protected override void LoadCore() { return; } }
To reproduce: Create a BindingSource and set its DataSource. Create a RadBindingNavigator and RadGridView: BindingSource bs = new BindingSource(); ICollection<Dummy> ds = new List<Dummy>();//generate some data bs.DataSource = ds; bs.CurrentChanged += bs_CurrentChanged; Start the application and you will notice that when you click one of the navigation buttons of the RadBindingNavigator the current number will change, it will also change the current row in the grid. But if you change the row in the grid, the current number in the RadBindingNavigator will not change. Workaround: Update the Text manually by subscribing to the CurrentChanged event of the BindingSource: void bs_CurrentChanged(object sender, EventArgs e) { this.Navigator.BindingNavigatorElement.CurrentNumberTextBox.Text = (this.Navigator.BindingSource.Position + 1).ToString(); }