Remove Data grid row by clicking button outside data grid

0
Is it possible to remove data grid row when user clicks on a button that is placed outside data grid? If its possible can someone provide steps to implement this.
asked
2 answers
2

Yes, you can do this using a listening data view with a button inside of it. On your page, add a data view. In the data view properties, set your data source to "listen to grid", and select the grid in the dropdown box.

Inside that data view, you can create a button that runs a microflow to delete the object in your grid. Set that delete activity to refresh and it'll disappear from the grid as well.

answered
0

 

Mohan,

if you mean remove the selected datagrid row when a user clicks on a button placed outside of datagrid, the answer is no.  At least not out of the box.  What you could do is  something like this:

  • Add an attribute called Selected (boolean) to the entity listed in the datagrid
  • Create a microflow that accepts an object of that entity and sets Selected to true (and maybe sets Selected on all other objects to false, if that is how things should work)
  • Add that microflow as an action button on the datagrid, mark the button as the default button
  • Set the datagrid to no selection, set the default button trigger to single click

Now you can 'select' a row in the datagrid.  A microflow outside of the datagrid can retrieve the 'selected' row and delete it.  You could also display the Select entity in the datagrid to indicate which row has been selected.

If you wanted to enhance this a bit, you could create Selected as an enumeration instead with 2 values: yes and no.  Each value could have an image, and you could display the enumeration image in your datagrid.

Maybe that will give you some ideas.

Mike

answered