[Data Grid Reactive] Execute action in an action column when it receives the focus
Forge component by OutSystems R&D
Application Type
Reactive

Hi,

We have a grid that shows an overview of products. The grid has an action column that shows some detailed information regarding each product when it is clicked. 

I wonder if there is a possibility to also have that action fired when the action column field receives the focus. This would allow the users to use the arrow-up and arrow-down keys to scroll between the details for each of the products shown in the grid.

Regards,
Alfio Esposito

Hello Alfio Esposito,

Thanks for bringing this subject to the discussion.

At the moment, it is not available on the DataGrid component without a workaround. Nevertheless, we intend to keep growing our API methods and events on the DataGrid component.

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

1) Create a handler for your OnInitialize event of the Grid component.


2) Add a JS Block containing all the logic that you need for your triggers. In this case, I only used the keyup event for the keys: Arrow Up and Arrow Down.

3) Check if the keyup event triggers the ActionClick event from the Action Column.

Please bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases. We are continuously working to provide more API methods, so I suggest you keep tuned, as we intend to launch new events that might replace the code that I provided in my previous answer in order to make it easier to custom such behaviors.

Best regards,

Tiago Pereira


DataGridReactiveTriggerActionClick.oml

Hi Tiago,

Thank you very much for looking into this and for making the effort of creating an example application. I will try to find some time this week to play around with it. (We have a busy sprint that ends on friday :-) ).

Regards,
Alfio

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