how to reset the selected row for SelectionChanged
Hi,
Maybe I need to do it completely different but what I currently have is a dataGrid showing several records.
When I select one of them a popup is displayed with the contents of the record.
When I close the popup I cannot select the same record again to show the popup as the selection didn't change and therefor the SelectionChanged event isn't triggered again.
How can I overcome this? Is there a way to clear the which row was selected to force the SelectionChanged event to fire again?
Or maybe I need to use a different approach altogether?
As far as I can find there isn't a RowTapped event or something similar?
Hi Alban
Tilanus,
Thank you for contacting us,
|
Query |
Response |
|
|
When I select one of them a popup is displayed with the contents of the record. When I close the popup I cannot select the same record again to show the popup as the selection didn't change and therefor the SelectionChanged event isn't triggered again.
|
You need to show
the popup when selecting the same record again. You can achieve this by using
the GridCellTapped event instead of SelectionChanged. We have shared a code
snippet and a simple sample for your reference. Could you please review them
and confirm whether they meet your requirements?
|
Regards,
Sethupathy D.
Attachment: SfDataGridSample_b6ab9029.zip
Works perfectly.
I originally got confused by the name as I was looking for row selections so I didn't think about cell selections.
Thanks!
Hi Alban,
We are glad to know that the provided solution worked at your end. Please let us know if you have any further queries on this. We are happy to help.
Regards,
Sethupathy D.
- 3 Replies
- 2 Participants
- Marked answer
-
AT Alban Tilanus
- Jan 21, 2025 07:23 PM UTC
- Jan 28, 2025 07:12 AM UTC