Hi Experts, I have a business use case where I am displaying list of objects in a Grid and now the issue is with delete action I have to provide user an ability to soft delete a row from grid. Here soft delete means the object should not get deleted from database, a flag should be updated when user selects a row and clicks on delete button and the same row should get disappear from screen. Is there a way to hide grid row based on a condition which matches a value available in one of the grid column? Thanks for your help in advance! Veera
Two options, preferably use the first:
Make sure only the right objects with the flag set to false are loaded in the first place. So, when changing it via a button on the page, make sure the grid is refreshed;
Add a container in the List View in which you add conditional visibility using the attribute in the expression
If I got the scenario correct, I think you just require an attribute and based on its value, data should be populated in the grid (which means some rows will be hidden). So to implement this, you can create a MarkAsDeleted attribute in your entity. And for the grid data source, use an xpath to only show rows which are not marked as deleted i.e., (MarkAsDeleted is false)
When you do the delete action, change the attribute for those selected objects and trigger a refresh in client. This will hide those rows from grid.