Skip to main content
A newer version of this page is available. .
All docs
V20.2
.NET Standard 2.0+
  • The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.

GridListEditor.SelectObjects(IEnumerable) Method

Selects a set of specified objects.

Namespace: DevExpress.ExpressApp.Blazor.Editors.Grid

Assembly: DevExpress.ExpressApp.Blazor.v20.2.dll

Declaration

public void SelectObjects(
    IEnumerable objectsToSelect
)

Parameters

Name Type Description
objectsToSelect IEnumerable

A collection of objects to select.

Remarks

The code sample below demonstrates how to create a simple action that selects all records within a List View:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Blazor.Editors.Grid;
using DevExpress.Persistent.Base;
using MySolution.Module.BusinessObjects;

namespace MySolution.Module.Controllers {
    public class MySelectController : ObjectViewController<ListView, DemoTask> {
        public MySelectController() {
            SimpleAction selectAllTasksAction = new SimpleAction(this, "SelectAllTasksAction", PredefinedCategory.View) {
                Caption = "Select All Tasks",
                SelectionDependencyType = SelectionDependencyType.Independent,
                TargetViewNesting = Nesting.Root
            };
            selectAllTasksAction.Execute += SelectAllTasksAction_Execute; ;
        }

        private void SelectAllTasksAction_Execute(object sender, SimpleActionExecuteEventArgs e) {
            if(View.Editor is GridListEditor gridListEditor) {
                gridListEditor.SelectObjects(ObjectSpace.GetObjects<DemoTask>());
            }
        }
    }
}
See Also