0

I have simple questions how to enable the append button in my GridControl. I have tried lot of things like:

GridView.OptionsView.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways;
GridControl.EmbeddedNavigator.OptionsBehavior.AllowAddRows = true;
GridControl.EmbeddedNavigator.Buttons.Append.Enable = true;
GridControl.EmbeddedNavigator.Buttons.Append.Visible = true;
GridControl.EmbeddedNavigator.Enable = true;
GridControl.EmbeddedNavigator.Visible = true;

I run out of idea how to solve this simple task. Please help me.

I use DevExpress Version 18.1.5.

Piotr Wojcik
  • 95
  • 1
  • 17

1 Answers1

2

It's possible to show the Append button only if the grid's DataSource supports the IBindingList interface and its AllowNew method returns true. Otherwise, it's not clear how GridControl should add a new record. If your datasource doesn't implement IBindingList, consider using the standard BindingList class instead.

Alternatively, you can create custom buttons using the CustomButtons property.

Dmitrii Babich
  • 489
  • 3
  • 4