GridColumnFilter

GridColumnFilter

You can create filter in all grid columns. You need to specify the column name and the type of filter you would like for this column.

The following types are available:

  • text: Will show a text input field for the search criteria.

  • select: A selection for all available options is shown.

  • multiSelect: like select-option. It is possible to select multiple entries.

[
   {
       "column":"imImei",
       "filterType":"text"
   }, 
   {
        "column":"imItemId",
        "filterType":"select"
   },
   {
        "column":"imItemGroup",
        "filterType":"multiSelect"
   }
]

If the grid is configured for Server Side Paging additional options are available.

  • serverSideMinInputLength: Allows to set a minimum character count for user input, before the search is triggered.

  • serverSideSQLStatement : If the filter option is set to select/multislect a SQL statement can be used to show the available options. For config based grids this is optional (A distinct value for the column will be generated by default). For SQL based grids this setting must be provided. The setting needs to have the name of a valid SQL Statement defined in this app.

The SQL statement must return a list consisting of 2 columns: id and text. The id value will be used as the search criteria. The text value will be shown to the user as option. The parameter “columnSerachValue” will contain the current user input.

Example of a valid SQL statement:

DECLARE @searchLike nvarchar(100) = '%' + @columnSearchValue + '%';
SELECT * FROM (
        SELECT 'id1' AS id, 'text1' AS text UNION ALL
        SELECT 'id2' AS id, 'text2' AS text UNION ALL
        SELECT 'id3' AS id, 'text3' AS text UNION ALL
        SELECT 'id4' AS id, 'text4' AS text UNION ALL
        SELECT 'id5' AS id, 'text5' AS text 
        ) AS ResultList
        WHERE text LIKE @searchLike

Last updated