[Data Grid Reactive] Getting Header name i addition to Binding in OnFiltersChange?
Forge component by Bruno Martinho
Application Type
Reactive

Hi


When using the OnFilterChange-event, would it be possible to get hold of the Header name in addition to the Binding name? For showing the grid active filter it would be nice to show the Headers value and not the binding name, as the binding name is more technical (enitity attribute name). Or is the any other way of getting the active filter shown to be the header value?


regards

Bård

Hello Bård Indredavik,

Thanks for bringing this subject to the discussion.

At the moment, this functionality is not available. I have already passed your question to the team as a possible suggestion for different approaches in the future.

-------------------------------------------------------

Right now, I would suggest the following workaround (.oml attached to the reply)

Create a new action in the Client Actions folder. Inside, you might want to add JavaScript just like in the image below. Make sure to set this client action as a function.



For the code, I used the snippet:

$parameters.Header = GridAPI.GridManager.GetGridById($parameters.GridWidgetId).getColumn($parameters.Binding).provider.header


After dragging the OnFiltersChange Grid Event into the sample and creating the handler for the event, all you need to do is map both ColumnWidgetId and the GetHeader function that was set on the Client Actions.


Hope this answer is useful.

Best regards,

Tiago Pereira

DataGridReactiveShowActiveFilters.oml

Thanks, that works well!

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