Heey Raghavendra,
You have 2 options here:
1. Add a standard select all button to your datagrid to select all the objects after filtering and then a second action button with an input parameter a list of the entity you are showing on the datagrid
2. In the general settings of a datagrid you can set the selection mode to: Multi-selection. With that option you can select multiple rows, and then add an action button with an input parameter a list of the entity you are showing on the datagrid