ButtonEdit() Constructor
Initializes a new ButtonEdit control instance.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v18.2.dll
Declaration
Remarks
Use the constructor to create a standalone ButtonEdit control. This initializes all properties to their default values. The editor is created with a single button (of type ButtonPredefines.Ellipsis). The ButtonEdit.Properties property allows you to customize the editor’s appearance and behavior.
To create a button editor inplace for XtraGrid, for instance, you should create a corresponding repository item of the RepositoryItemButtonEdit class and assign it to a column.
Example
The following code creates a button edit control and places it onto a panel1 panel. The code changes default button kind (ellipsis) into ButtonPredefines.OK and adds another button (ButtonPredefines.Delete) to the button’s collection.
The result of code execution is displayed below:
ButtonEdit btnEdit1 = new ButtonEdit();
btnEdit1.Width = 100;
btnEdit1.Properties.Buttons[0].Kind = ButtonPredefines.OK;
btnEdit1.Properties.Buttons.Add(new EditorButton(ButtonPredefines.Delete));
panel1.Controls.Add(btnEdit1);
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ButtonEdit() constructor.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.