Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error dialog pop-up when edit the DefaultCellStyle property in DataGridView control #3047

Closed
John-Qiao opened this issue Apr 8, 2020 · 17 comments · Fixed by #9990
Closed
Assignees
Labels
area-DesignerSupport tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework

Comments

@John-Qiao
Copy link
Member

John-Qiao commented Apr 8, 2020

.NET Core Version:

5.0.100-preview.4.20202.8

Have you experienced this same bug with .NET Framework?:

No

Problem description:
When edit the cell style properties for a DataGridView control in PropertyGrid, an error dialog pop-up.
5 0

More info:

  1. This issue occurs in all cell style properties: AlternatingRowsDefaultCellStyle, ColumnHeadersDefaultCellStyle, DefaultCellStyle, RowHeadersDefaultCellStyle and RowDefaultCellStyle.
  2. If target .NET Core project to 3.1, these proprties are grey and cannot edit.
    3 1

Expected behavior:

The CellStyle Builder dialog should be opened.
Framework

Minimal repro:

  1. Launch the attached project in VS and run it.
  2. Click the … edit button for AlternatingRowsDefaultCellStyle property in PropertyGrid.
    Core5.0-TestApp.zip
@merriemcgaw
Copy link
Member

merriemcgaw commented Apr 16, 2020

@dreddy-work - do you need these ASAP for your DGV work?

Might be related to #1115

@merriemcgaw merriemcgaw added this to the 5.0 milestone Apr 24, 2020
@merriemcgaw
Copy link
Member

ping @dreddy-work :)

@kirsan31
Copy link
Contributor

In 16.7 Preview 5 with .NET Core 3.1 target. All style dialogs opening correctly, but produce no code - no changes.

@merriemcgaw
Copy link
Member

@John-Qiao can you check to see if this is already fixed, and if so, close?

@merriemcgaw merriemcgaw modified the milestones: 5.0, 6.0 Sep 8, 2020
@John-Qiao
Copy link
Member Author

@merriemcgaw Verified the issue in Dev16 16.8.0 Preview 4.0 [30507.17.main] + .NET 6.0.100-alpha.1.20455.1, this issue still can be reproduced, please check below screenshot:
DGV-PropertyGrid

@RussKie RussKie added area-DesignerSupport tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework labels Sep 14, 2020
@kirsan31
Copy link
Contributor

kirsan31 commented Sep 16, 2020

V.S. 16.8 pr. 3.

  • With netcoreapp3.1 target: all as was before - all style dialogues opening correctly, but produce no code - no changes. Corresponding issue.
  • With net5.0-windows target (Version: 5.0.100-rc.2.20465.34 Commit: 7e7de71fc4): the designer not working at all - not show any control properties. Corresponding issue.

@merriemcgaw
Copy link
Member

Thanks @kirsan31 , I'm following up on these two issues personally. The 5.0 SDK one is particularly worrisome as we're in the very end of the 5.0 ballgame. We'll keep you posted. Thank you so much for filing the Developer Community issues, by the way! It makes diagnostics easier by far. We'll reach out if we need any more info from you about the issues. Thanks again!

@merriemcgaw
Copy link
Member

I tested with the public release of 16.8p3 and the latest build of .NET Core (one later than yours I think). The designer is not blocked, we can see properties now for controls that are selected. For the DataGridView dialogs, we're working on getting them updated as part of another effort, and the result of that effort is expected to resolve the issues with not writing code changes to the file. You should see a fix in 16.8p4 (can't make promises but that's the current plan).

@dreddy-work
Copy link
Member

@John-Qiao , can you try this, one more time with final version of Preview4?

@kirsan31
Copy link
Contributor

@dreddy-work I've checked.

  • Changing styles works and produce code with both netcoreapp3.1 and net5.0-windows. That's cool.
  • All this old bugs, are still present.
  • undo not working or working bad:
    vsd1
    vsd2

@dreddy-work
Copy link
Member

Undo/Redo is something that is still in works for core designer. Can you create a new bug for that to track and close this issue to avoid confusion/ambiguity? We have a bug in the designer repo to track undo/redo but this repo is not public. So, new bug will be tracking purpose only.

@John-Qiao
Copy link
Member Author

@dreddy-work I have retested this issue with latest main VS 2019 + latest .NET 5.0.100-rtm.20518.2 SDK, all the cell style property dialogs can be opened correctly in Properties window whether targeting project to .NET Core 3.1 or .NET 5.0. But the cell style property dialog still cannot be opened from PropertyGrid when running project. Please check the below gif files:

  1. When targeting project to .NET Core 3.1 and running it, all the cell style properties are grey and cannot edit in PropertyGrid.
    TestApp-Core3.1.zip
    TestResult-3 1

  2. When targeting project to .NET 5.0 and running it, then try to edit the cell style properties in PropertyGrid, the initial error dialog will pop-up.
    TestApp-Core5.0.zip
    TestResult-5 0

@kirsan31
Copy link
Contributor

OmG. I think it's my personal failure - I confused everyone in this thread :( I just once again read original issue and understand that all of this was about runtime - not designer! Sorry 😟
Can confirm all @John-Qiao said above, this is runtime regression:

  • net5.0-windows - error.
  • netcoreapp3.1 - gray out.
  • net472 - works as expected.

@kirsan31

This comment has been minimized.

@RussKie
Copy link
Member

RussKie commented Dec 21, 2020

I think labels must be corrected for this issue (see above)?

Why?
Are you sure you're not confusing https://github.com/dotnet/winforms/labels/area%3A%20designer%20support and https://github.com/dotnet/winforms/labels/area%3A%20VS%20designer?

@kirsan31
Copy link
Contributor

I think labels must be corrected for this issue (see above)?

Why?
Are you sure you're not confusing https://github.com/dotnet/winforms/labels/area%3A%20designer%20support and https://github.com/dotnet/winforms/labels/area%3A%20VS%20designer?

Indeed - my bad, sorry.

@RussKie RussKie modified the milestones: 6.0, Future Aug 27, 2021
@ghost ghost added the 🚧 work in progress Work that is current in progress label Sep 26, 2023
@LeafShi1 LeafShi1 self-assigned this Sep 26, 2023
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Sep 27, 2023
@ghost ghost removed this from the Future milestone Sep 27, 2023
@MelonWang1
Copy link
Contributor

Verified this issue on .NET 9.0.100-alpha.1.23504.14+main private dll, issue was fixed. Screenshot as below.

3047.mp4

@ghost ghost locked as resolved and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-DesignerSupport tenet-compatibility Incompatibility with previous versions or with WinForms for .NET Framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants