dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.42k stars 984 forks source link

DataGridView shown on components area, not visual design surface #11220

Closed deerchao closed 6 months ago

deerchao commented 7 months ago

.NET version

.Net 8.0.1

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No in .Net 6.0.

Issue description

In DemoConsole application, if we add DataGridView/PropertyGrid to the surface, it won't be visible, or can't be selected clicking, and there would be an additional entry in the invisible component section(like where Timers usually show up). Untitled Untitled2

Steps to reproduce

Run DemoConsole application, switch to the 5th tab page.

merriemcgaw commented 7 months ago

Thanks @deerchao for reporting this issue. This is a test application, that doesn't necessarily reflect a real-world scenario. We'll keep this open, but it's low priority until we get a user-scenario needing this functionality.

Can you help us understand your scenario here? Is this blocking a customer facing scenario for you?

deerchao commented 7 months ago

I'm developing a low-code platform, with an UI designer included, which is built with WinForms designer facilities.

If the controls doesn't show up on designer visual surface, it would be hard for my users to set up the UI, especially when they are not professional programmers. For my scenario, this has to be solved or worked around, or the GUI design related features would be pointless.

Bad news is that it's not happening for only DataGridView, but also PropertyGrid/FlowLayoutPanel/TrackBar, and other controls.

Good news is if I wrap them within a UserControl, it seems to work, but this would mean much more work to do.

LeafShi1 commented 6 months ago

DataGridviewDesignerwas added to 9.0 Preview 3 via this Commit and it was not backported to .net 8.0 so this issue is correct on 8.0

Tanya-Solyanik commented 6 months ago

@LeafShi1 - does this repro in main?

LeafShi1 commented 6 months ago

@LeafShi1 - does this repro in main?

No, the control can be displayed normally in the main branch image

Tanya-Solyanik commented 6 months ago

@deerchao - would it be possible for you to move to NET9 preview for your development?

deerchao commented 6 months ago

@deerchao - would it be possible for you to move to NET9 preview for your development?

OK, I'm going to have a try.