150
Views
8
Comments
Solved
[OutSystems Data Grid] How to set max limit of filter value in datagrid
outsystems-data-grid
Reactive icon
Forge asset by OutSystems

Hello,

Currently in datagrid max limit for filter list is 250, I want to change it. How to do it in react?

I already tried with SetColumnFilterOptions on OnReady event of page, but its not working

Thanks

Prajakta Roshankhede

2020-08-05 09-00-16
Gabriel Lundgren
Solution

This client action only works with server side pagination for now.


I've attached a sample with a custom JS snippet that allows you to change a column's filter limit.

columnFilter.oml
2020-08-05 09-00-16
Gabriel Lundgren

Hey @Prajakta Roshankhede,


Can you try using the client action on Grid's On Initialize event?

If that doesn't work, could you please send us your sample so we can have a better understanding on what's going on?


Thank you,

Gabriel Lundgren


2021-01-12 14-29-49
Prajakta Roshankhede

Its not working, please see attached image for the same

2020-08-05 09-00-16
Gabriel Lundgren

Could you please send us your sample so we can have a better understanding on what's going on?

2021-01-12 14-29-49
Prajakta Roshankhede

Hello Gabriel,

Please refer attached sample for the same,

Note: I don't want server side pagination and want to increase limit of action column filter.

DataGridSample_v9.oml
2020-08-05 09-00-16
Gabriel Lundgren
Solution

This client action only works with server side pagination for now.


I've attached a sample with a custom JS snippet that allows you to change a column's filter limit.

columnFilter.oml
2021-01-12 14-29-49
Prajakta Roshankhede

Its Working, thank you so much! 

Is there any way to apply directly on all column instead of single column?

2020-08-05 09-00-16
Gabriel Lundgren

You could loop through our columns.

var grid = GridAPI.GridManager.GetGridById($parameters.GridWidgetId);

var columns = grid.getColumns();

if (columns) {
   columns.forEach(function (column) {

          grid.features.filter._filter.getColumnFilter(column.provider).valueFilter.maxValues = $parameters.MaxOptions;

    });
}



2021-01-12 14-29-49
Prajakta Roshankhede

Thanks Gabriel, really appreciate your help!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.