fix Issue "ColumnType is disabled for Columns in EditColumns dialog"#10907
fix Issue "ColumnType is disabled for Columns in EditColumns dialog"#10907Epica3055 merged 3 commits intodotnet:mainfrom
Conversation
cf4459b to
9e134b8
Compare
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
....Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.Picker.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.cs
Outdated
Show resolved
Hide resolved
|
|
||
| public override object EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value) | ||
| { | ||
| if (provider is not null) |
There was a problem hiding this comment.
| 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.
src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DataGridViewColumnTypeEditor.cs
Outdated
Show resolved
Hide resolved
|
Add a type forward for the new editor here -https://github.com/dotnet/winforms/blob/main/src/System.Design/src/System.Design.Forwards.cs |
5f4bcae to
04b48b2
Compare
Codecov ReportAttention:
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
Flags with carried forward coverage won't be shown. Click here to find out more. |
lonitra
left a comment
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
Please use string interpolation:
| 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)); |
| private void CloseDropDown() | ||
| { | ||
| _windowsFormsEditorService?.CloseDropDown(); | ||
| } |
There was a problem hiding this comment.
| private void CloseDropDown() | |
| { | |
| _windowsFormsEditorService?.CloseDropDown(); | |
| } | |
| private void CloseDropDown() => _windowsFormsEditorService?.CloseDropDown(); |
73cbc38
Fixes #10364
Proposed changes
Risk
Screenshots
Before
After
Test methodology
Test environment(s)
9.0.0-preview.2.24116.2
Microsoft Reviewers: Open in CodeFlow