winforms icon indicating copy to clipboard operation
winforms copied to clipboard

8768 :: Resolve Addrange issue after sorting.

Open RutulPatel8 opened this issue 9 months ago • 1 comments

Fixes #8768

Proposed changes

if tree is already sorted then we don't want to set fixed Index value. due to these reason It is misbehave.

Customer Impact

  • No

Regression?

  • Yes

Risk

  • No

Before

When the user adds a value to the treenode list and sorts it using treeview.sort(), it works fine. Subsequently, when the user adds individual trees through the add event, it functions as expected and sorts the entire tree automatically. However, if the user adds multiple values through AddRange, it does not work as expected.

After

I've fixed the sorting issue we discussed earlier, and now everything is working smoothly. When users add values individually or use treeview.sort(), the sorting works fine. Even when they add multiple values at once using AddRange, the sorting behaves as expected.

Test methodology

  • Testcase added

Test environment(s)

  • tested with .net core 8.0
Microsoft Reviewers: Open in CodeFlow

RutulPatel8 avatar May 01 '24 08:05 RutulPatel8

@RutulPatel8 - please investigate test failures and take a look at another PR in TreeNodesCollection area that might be addressing this regression as well https://github.com/dotnet/winforms/pull/11253.

Tanya-Solyanik avatar May 01 '24 19:05 Tanya-Solyanik

@RutulPatel8 I am sorry. I was trying to fix the conflict but I messed up 🤣 I created a new pr here 11423

Epica3055 avatar May 24 '24 07:05 Epica3055