Hi everyone,
I am using OutSystems Data Grid, I want to disable the filtering of all columns in my Grid. I found a discussion about disabling the filter by Column Id. However, in my application, I have to add columns dynamically. So I can't get the Id of the Column. Does anyone have an opinion on my situation?
Thanks
I used JS to iterate all columns from my Grid to Disable Filters. So I can solve my problem. Thank you for your efforts.
Hi kdo,
Follow the link - https://www.outsystems.com/forums/discussion/77750/outsystems-data-grid-data-grid-column-filter-deactivate/
Maybe it will help you.
Hi Gourav,
Thanks for your information, I read the above thread but it seems to be a problem with the Data Grid and not the instructions to config. I didn't find a way to configure to disable filtering for my Grid.
Hi @kdo
Which DataGrid version are you using? Can you share a sample oml with what you've tried so far?
Check .OML file of that thread.
Ah, I see the client actions. But in my case, I don't know how many columns I have. So I can't use client action to Deactivate Filter
Hi @kdo , good day. May I see your JS code please? I would like to do what you did too! Thanks.
Hi @Han Chooi,
I am using the JS code below:
var grid = OutSystems.GridAPI.GridManager.GetActiveGrid();
grid.provider.formatItem.addHandler(function(s, e) {
if (e.panel === s.cells) {
var col = s.columns[e.col];
grid.features.filter._filter.getColumnFilter(col).filterType = 0;
}
Regards,
Khoa
Thank you so much Khoa! Appreciate it.