sfDataGrid the row keeps selected

I have a sdDataGrid binded to a collection.

Once a row is selected (for example with mouse single click) I can not find a way to really deselect it.
I use unit a row and single selectDeselect.
I tried different approaches:

1) Enabling the select and deselect.
This looks like working as when I make a single mouse click the row the color of the row changes to the color as it would not be selected.
But now if I change the sorting order by pressing on the Header Row, for some reasons I have again a row highlighted (or selected I do not know really the state) and the carret is set on a position to be able to have visible this row.

2) I tried programmatically to 
a) modify the on events SortColumnsChanged / SortColumnsChanging with all possible combinations

            mainSfDataGrid.SelectedIndex = -1;
            mainSfDataGrid.SelectedItem = null;
            mainSfDataGrid.SelectedItems.Clear();
            mainSfDataGrid.SelectRows(-1, -1);
            mainSfDataGrid.Refresh();

I currently use .NET8 (is it maybe better to use an older?)

What I'm doing wrong ?

What I would like once the filter or sorting is changed that nothing is selected and the caret is on top.


5 Replies

SP Sreemon Premkumar Muthukrishnan Syncfusion Team November 18, 2024 03:03 PM UTC

Hi Daniele Wyss


We have created a bug report for the reported issue “Deselected row gets selected again upon sorting with row selection when SelectionMode is SingleDeselect”. We will include this fix in our upcoming Weekly NuGet release which is scheduled for December 10, 2024.

You can track the status of this report through the following feedback link,

Feedback Link:Deselected row gets selected again upon sorting with row selection when SelectionMode is SingleDeselect in WinForms | Feedback Portal

Note: The provided feedback link is private, and you need to login to view this feedback.

We will let you know once it is released. We appreciate your patience until then.

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,
Sreemon Premkumar M.



SP Sreemon Premkumar Muthukrishnan Syncfusion Team December 10, 2024 03:58 PM UTC

Hi Daniele Wyss,


Due to the 2024 Volume 4 Main Release schedule set for mid-December, there is no NuGet package release today. However, this fix will be included in the upcoming 2024 Volume 4 Main Release. We will inform you once the fix is incorporated.

We appreciate your patience in the meantime.


Regards,
Sreemon Premkumar M.



SP Sreemon Premkumar Muthukrishnan Syncfusion Team December 12, 2024 03:07 PM UTC

Hi Daniele Wyss,


We regret the inconvenience. We are unable to include the fix for this issue, "Deselected row gets selected again upon sorting with row selection when SelectionMode is SingleDeselect" in our 2024 Volume 4 Main Released today as promised.

We will address this issue and include the fix in the weekly NuGet release scheduled on December 24, 2024.

We will let you know once it is released. We appreciate your patience until then.

Thank you for your understanding and cooperation.


Regards,

Sreemon Premkumar M.



SB Sweatha Bharathi Syncfusion Team December 24, 2024 01:30 PM UTC

 Hi Daniele Wyss,,

We regret the inconvenience.
We are unable to include the fix for this issue in our NuGet package released today, as promised. We have identified the cause of the issue. Since it is related to selection, we need additional time to fix it and ensure stability. We will address this issue and include the fix in our upcoming weekly NuGet release, scheduled for January 7, 2025.
We will inform you once it is released. We appreciate your patience in the meantime.

Regards,
Sweatha.B



SB Sweatha Bharathi Syncfusion Team January 7, 2025 01:11 PM UTC

Hi Daniele Wyss,
 
We would like to let you know that Essential Studio Weekly NuGet packages (v28.1.38) has been published in nuget.org with the fix for the issue “Deselected row gets selected again upon sorting with row selection when SelectionMode is SingleDeselect”. Please let us know if you have any concerns in this.
 
 
Root cause:
 
Previously, the selection process was performed unwantedly after the sorting operation, which is the root cause of the issue.

Regards,
Sweatha.B

Loader.
Up arrow icon