Restrict onclick action of rows of data grid2 based on condition

0
Hello Everyone ,   I'm displaying some set of data through data grid2 . In onclick action I'm calling some microflow to do some functionality . I need to restrict the onclick of some specific rows based on some condition . That condition is If current object's Boolean attribute is true , I need to disable the onclick of that row .  Can we achieve this functionality with JavaScript . If yes can someone help me to achieve this .   Thanks in Advance !
asked
3 answers
0

Hi Vinodhini,

 

Have you tried to use dynamic row class? For example, you can create custom css class: 

.noClick {

pointer-events: none;

}

Dynamic row class on DataGrid2:

if true

    then 'noClick' 

 else ''

 

answered
0

Hi Vinodhini,

I am not sure but i don’t think this can be achievable.

But here you can manipulate this on the basis of visibility.

Just off the datagrid2 row click functionality -> show your data inside container with the help of custom content -> take custom content inside this take 2 containers-> show your data what you want to show -> In the 1 container set the visibility $currentObject/BooleanAttribute =true & set nothing onClick on this container -> In the 2 Container set the visibility $currentObject/BooleanAttribute = false & set onClick action what you want to perform on this container.

 

By using this logic you can manipulate the onClick of row.

Hope you like the answer

answered
0

In addition to disabling it in the front-end, for proper security you can build your logic in the first decision block of a Microflow and disable the activity based on the condition you want. So someone could click on the row but nothing would happen still.

 

That accompanied with the pointer-events: none CSS rule suggested by David should suffice

answered