Skip to content

The CellParsing event of the datagridview can't be invoked when changing the value of the cell firstly #1098#1524

Merged
1 commit merged intomasterfrom
dev/v-milipi/Issue_1098_Delay_EditingControlAccessibleObject_initialization
Aug 1, 2019
Merged

The CellParsing event of the datagridview can't be invoked when changing the value of the cell firstly #1098#1524
1 commit merged intomasterfrom
dev/v-milipi/Issue_1098_Delay_EditingControlAccessibleObject_initialization

Conversation

@M-Lipin
Copy link
Copy Markdown
Contributor

@M-Lipin M-Lipin commented Jul 29, 2019

Fixes #1098

Proposed changes

  • Reworking DataGridViewCell.InitializeEditingControl() method to delay EditingControlAccessibleObject initialization until DataGridView EditingControl is initialized and its handle is created.
  • Delaying EditingControlAccessibleObject initialization is done by moving dgv.EditingControlAccessibleObject.get() call to dgv.EditingControl.HandleCreated event handler, so we have EditingControlAccessibleObject accessed only after the control's handle creation.

Customer Impact

  • None
  • There were no major releases which include the bug (introduced and fixed within the dev process in 3.0)

Regression?

  • Yes

Risk

  • None, product is not being changed

Screenshots

Before

Bug_1098_Before

  • For the first time control's handle is created when accessing EditingControlAccessibleObject.

After

Bug_1098_After

  • For the first time control's handle is created and the EditingControlAccessibleObject is accessed.

Test methodology

  • Manual testing, debugging, Narrator announcement - passed.
  • Need QA approval.
  • Need to test near cases and search for regressions.

Accessibility testing

Test environment(s)

.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-012929
Commit: 795f8aeaa8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview8-012929\

Host (useful for support):
Version: 3.0.0-preview8-27907-09
Commit: fc924dc319

.NET Core SDKs installed:
2.1.700-preview-009601 [C:\Program Files\dotnet\sdk]
2.1.800-preview-009696 [C:\Program Files\dotnet\sdk]
3.0.100-preview8-012929 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview8.19351.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview8-27907-09 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview8-27907-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Microsoft Reviewers: Open in CodeFlow

@M-Lipin M-Lipin requested a review from a team as a code owner July 29, 2019 11:33
@M-Lipin M-Lipin added 🪲 bug Product bug (most likely) 💥 regression-preview Regression from a preview release waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Jul 29, 2019
@M-Lipin M-Lipin added this to the 3.0.0-Preview8 milestone Jul 29, 2019
@M-Lipin M-Lipin changed the title Delaying EditingControlAccessibleObject initialization. The CellParsing event of the datagridview can't be invoked when changing the value of the cell firstly #1098 Jul 29, 2019
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 29, 2019

Codecov Report

Merging #1524 into master will decrease coverage by 0.07766%.
The diff coverage is 0%.

@@                 Coverage Diff                 @@
##              master       #1524         +/-   ##
===================================================
- Coverage   25.74308%   25.66541%   -0.07767%     
===================================================
  Files            786         786                 
  Lines         268243      268256         +13     
  Branches       37977       37978          +1     
===================================================
- Hits           69054       68849        -205     
- Misses        194295      194512        +217     
- Partials        4894        4895          +1
Flag Coverage Δ
#Debug 25.66541% <0%> (-0.07767%) ⬇️
#production 25.66541% <0%> (-0.07767%) ⬇️
#test 100% <ø> (?)

Copy link
Copy Markdown
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RussKie RussKie removed 💥 regression-preview Regression from a preview release 🪲 bug Product bug (most likely) labels Jul 29, 2019
@RussKie
Copy link
Copy Markdown
Contributor

RussKie commented Jul 31, 2019

As we are now in the "tell-mode" please update the description to include the new compliance sections
https://github.com/dotnet/winforms/blob/master/.github/PULL_REQUEST_TEMPLATE.md#L12-L27

@RussKie RussKie removed the waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Aug 1, 2019
@M-Lipin M-Lipin force-pushed the dev/v-milipi/Issue_1098_Delay_EditingControlAccessibleObject_initialization branch from 6ca0718 to 31ad7ee Compare August 1, 2019 11:34
@ghost
Copy link
Copy Markdown

ghost commented Aug 1, 2019

Hello @RussKie!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit fd9df08 into master Aug 1, 2019
@ghost ghost deleted the dev/v-milipi/Issue_1098_Delay_EditingControlAccessibleObject_initialization branch August 1, 2019 11:44
@ghost ghost added this to the 3.0.0-Preview9 milestone Aug 1, 2019
@merriemcgaw
Copy link
Copy Markdown
Member

Sweet! Thanks @M-Lipin!!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 5, 2022
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The CellParsing event of the datagridview can't be invoked when changing the value of the cell firstly

5 participants