powershell-universal icon indicating copy to clipboard operation
powershell-universal copied to clipboard

Event to deselect a datagrid selection

Open RockoTheeHut opened this issue 4 months ago • 0 comments

Summary of the new feature / enhancement

I have a dropdown that, when a user makes a selection, will refresh the data source of the datagrid. I have selection available and can grab the selected columns.

My use case is I select a row and then hit a delete button. However, if a user selects a row, then selects another datasource from the drop down, selects a row from the new data source, and when they go to delete, both the selected row from the first data source as well as the current datasource are in the datagrid selections.

In this use case a user selects a row, changes their mind and then just goes to a new data set, it would be expected that the previous data source before the datagrid refresh would remove datagrid selections.

This can have a serious consequence if a user doesn't know what is going on.

I would like to be able to reset the selections of a datagrid. I have tried to update the proprety directly using set-udelement but that does nothing

It looks like the same issue has been in the forums for a while with no resolution:

https://forums.ironmansoftware.com/t/refreshing-the-data-in-a-data-grid-selected-rows-remain-after-sync/9199 https://forums.ironmansoftware.com/t/reset-value-in-data-grid-selection/9182

Proposed technical implementation details (optional)

No response

RockoTheeHut avatar Oct 24 '24 20:10 RockoTheeHut