cancel
Showing results for 
Search instead for 
Did you mean: 

To add default filter to grid

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

To add default filter to grid

I have created one custom module with title & status field attribute in admin grid.

 

Grid collections in module_test_grid_block.xml

 

 <arguments>
             <argument name="id" xsi:type="string">testGrid</argument>
              <argument name="dataSource" xsi:type="object">Namespace\Module\Model\ResourceModel\test\Collection</argument>
              <argument name="default_sort" xsi:type="string">id</argument>
              <argument name="default_dir" xsi:type="string">desc</argument>                             
              <argument name="grid_url" xsi:type="url" path="*/*/grid"><param name="_current">1</param></argument>
        </arguments>

 

I just want to show the datas which are enabled.Have any option to add default filter in admin grid collections?