Restrict selection in datagrid based on the attribute value
I use simple multi select in my datagrid. On that I want to select and delete the objects from the Entity. But the selection should be done only based on the attribute value of the object in each row. For example, I have an boolean attribute in my entity, if the attribute is true I should be able to select the row else I should not be able to select that particular row like disabled. Thank you in advance.
The behaviour you describe is not supported by default. And i doubt if users would find it user friendly if they see a record in the grid but are not able to select that record.
Options i see:
Create a microflow action to do the delete. In this action you filter the selected items based on the the boolean and delete only the records with the correct value, or you check if records were selected with the “wrong” value and in that case present a blocking error to the user.
Create a separate grid containing only the records with the correct setting of the boolean and only present the delete-function there.
There are probably some other solutions i did not think of. In general: it is almost always the best strategy to go with what Mendix offers out of the box and not create custom widgets for this type of behaviour.