Hello,
Welcome to Microsoft Q&A!
You can't directly get the column value from the row directly. There is no API from the DataGrid could do it. But there is another way to implement what you want. You could save the bool flag into the data model that you are using. Then when you need to delete it, go through the model list and check the flag. If the flag is true, then you could remove them.
So the steps are like this:
- Add a new bool property let's say
ischecked
, to the data model for each row. - Binding the checkbox value to
ischecked
property of the data model in two way mode. So when the checkbox is checked or unchecked, you could directly get the value from the data model - When you need to delete the value, go through the model list, remove the data based on the
ischecked
property.
In this way, there is no more needs to be done in the UI system.
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.