Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

EditorButtonCollection.AddRange(EditorButton[]) Method

Adds an array of buttons to the current button collection.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public virtual void AddRange(
    EditorButton[] buttons
)

#Parameters

Name Type Description
buttons EditorButton[]

An array of EditorButton objects to add to the current button collection.

#Remarks

Use the AddRange method to add several buttons to the current button collection. The buttons parameter specifies an array of EditorButton objects to be added.

If you need to add a single button to the collection, use the EditorButtonCollection.Add method instead.

The following code adds two predefined buttons (OK and Delete) for a buttonEdit1 control. To remove old buttons, the Clear method is called.

EditorButton [] buttons = {new EditorButton(ButtonPredefines.OK), 
      new EditorButton(ButtonPredefines.Delete)};
  buttonEdit1.Properties.Buttons.Clear();
  buttonEdit1.Properties.Buttons.AddRange(buttons);

The result of the code is shown below:

ButtonEdit_AddRange

See Also