How to deselect an image from data grid 2 in a microflow?

0
Hello,   I have an overview page which lists the objects of some entity. I use data grid 2 with single selection. Below the data grid 2, I have a data view that listens to the data grid 2. Naturally, when an item is selected from the data grid 2, the data view is filled with its attributes. The cancel button in data view has the default "Cancel changes" on click action. However, when I use that, the page is closed and I don't want that. I just want to deselect the item so that data view is not filled. How can I do that?   Thank you.
asked
2 answers
0

Hello Ahmet,

 

Ahmet Selim Gül have you tried to set close page to no?

image.png

Hope this helps,

 

Good luck!

answered
0

Hi Ahmet,

 

Did you try to make OnChange microflow omn DataGrid2 that just removes the association to the Image?

 

Or on Cancel button, you can add a nanoflow with Javascript action that deselects the option in datagrid2, the code for deselecting is below: 

 

// BEGIN USER CODE
	
const dataGrid = document.querySelector(".your-grid-name");
const selectedRows = dataGrid.querySelectorAll(".tr-selected");
selectedRows.forEach(row => row.classList.remove("tr-selected"));

// END USER CODE

 

Let me know if that will work for you!

 

 

answered