Skip to content

fix Issue "ColumnType is disabled for Columns in EditColumns dialog"#10907

Merged
Epica3055 merged 3 commits intodotnet:mainfrom
Epica3055:Fix_Issue_10364
Feb 22, 2024
Merged

fix Issue "ColumnType is disabled for Columns in EditColumns dialog"#10907
Epica3055 merged 3 commits intodotnet:mainfrom
Epica3055:Fix_Issue_10364

Conversation

@Epica3055
Copy link
Member

@Epica3055 Epica3055 commented Feb 19, 2024

Fixes #10364

Proposed changes

  • Add DataGridViewColumnTypeEditor

Risk

  • low

Screenshots

Before

image

After

image

Test methodology

  • manually

Test environment(s)

9.0.0-preview.2.24116.2

Microsoft Reviewers: Open in CodeFlow


public override object EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value)
{
if (provider is not null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (provider is not null)
if (provider is null)
{
return value!;
}

Please review is nullability is defined correctly for EditValue return type. THis could be done in a follow up PR.

@Tanya-Solyanik
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik added the waiting-author-feedback The team requires more information from the author label Feb 19, 2024
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label Feb 20, 2024
@codecov
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 109 lines in your changes are missing coverage. Please review.

Comparison is base (852f7ef) 73.15679% compared to head (73cbc38) 73.16502%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #10907         +/-   ##
===================================================
+ Coverage   73.15679%   73.16502%   +0.00822%     
===================================================
  Files           3087        3093          +6     
  Lines         633665      633755         +90     
  Branches       47402       47416         +14     
===================================================
+ Hits          463569      463687        +118     
+ Misses        166587      166520         -67     
- Partials        3509        3548         +39     
Flag Coverage Δ
Debug 73.16502% <0.00000%> (+0.00822%) ⬆️
integration 18.38928% <0.00000%> (+0.16219%) ⬆️
production 46.63824% <0.00000%> (+0.01893%) ⬆️
test 94.99504% <ø> (+0.00059%) ⬆️
unit 43.52849% <0.00000%> (-0.00082%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Tanya-Solyanik
Tanya-Solyanik previously approved these changes Feb 20, 2024
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

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

Thank you!

@Tanya-Solyanik Tanya-Solyanik added the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Feb 20, 2024
lonitra
lonitra previously approved these changes Feb 21, 2024
Copy link
Member

@lonitra lonitra left a comment

Choose a reason for hiding this comment

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

LGTM, added a couple minor comments, but this can be done in a follow up

get
{
EditorAttribute editorAttr = new("Design.DataGridViewColumnTypeEditor, " + AssemblyRef.SystemDesign, typeof(System.Drawing.Design.UITypeEditor));
EditorAttribute editorAttr = new("System.Windows.Forms.Design.DataGridViewColumnTypeEditor, " + AssemblyRef.SystemDesign, typeof(System.Drawing.Design.UITypeEditor));
Copy link
Member

Choose a reason for hiding this comment

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

Please use string interpolation:

Suggested change
EditorAttribute editorAttr = new("System.Windows.Forms.Design.DataGridViewColumnTypeEditor, " + AssemblyRef.SystemDesign, typeof(System.Drawing.Design.UITypeEditor));
EditorAttribute editorAttr = new($"System.Windows.Forms.Design.DataGridViewColumnTypeEditor, {AssemblyRef.SystemDesign}", typeof(System.Drawing.Design.UITypeEditor));

Comment on lines 57 to 60
private void CloseDropDown()
{
_windowsFormsEditorService?.CloseDropDown();
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private void CloseDropDown()
{
_windowsFormsEditorService?.CloseDropDown();
}
private void CloseDropDown() => _windowsFormsEditorService?.CloseDropDown();

@Epica3055 Epica3055 dismissed stale reviews from lonitra and Tanya-Solyanik via 73cbc38 February 22, 2024 02:13
@Epica3055 Epica3055 merged commit 34d6061 into dotnet:main Feb 22, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0 Preview2 milestone Feb 22, 2024
@dotnet-policy-service dotnet-policy-service bot removed the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Feb 22, 2024
KlausLoeffelmann pushed a commit to KlausLoeffelmann/winforms that referenced this pull request Mar 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2024
@Epica3055 Epica3055 deleted the Fix_Issue_10364 branch January 8, 2025 08:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ColumnType is disabled for Columns in EditColumns dialog

4 participants