GridListEditor.UnselectAll() Method
Deselects all the selected objects.
Namespace: DevExpress.ExpressApp.Blazor.Editors.Grid
Assembly: DevExpress.ExpressApp.Blazor.v20.2.dll
NuGet Package: DevExpress.ExpressApp.Blazor
Declaration
Remarks
The code sample below demonstrates how to create a simple action that deselects 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 unselectAllTasksAction = new SimpleAction(this, "UnselectAllTasksAction", PredefinedCategory.View) {
Caption = "Unselect All Tasks",
SelectionDependencyType = SelectionDependencyType.RequireMultipleObjects,
TargetViewNesting = Nesting.Root
};
unselectAllTasksAction.Execute += UnselectAllTasksAction_Execute; ;
}
private void UnselectAllTasksAction_Execute(object sender, SimpleActionExecuteEventArgs e) {
if(View.Editor is GridListEditor gridListEditor) {
gridListEditor.UnselectAll();
}
}
}
}
See Also