Invoking the TDBGrid designer in WinForms for .NET 8

Posted by: adam.dawes on 20 June 2024, 5:24 am EST

    • Post Options:
    • Link

    Posted 20 June 2024, 5:24 am EST

    Hello,

    I am currently migrating a WinForms project using the ComponentOne TDBGrid from .NET Framework to .NET 8. I’ve encountered a problem and I’m hoping someone can clarify what I need to do.

    In .NET Framework, I can right-click any TDBGrid and select “Design” from the context menu. This then opens a designer window, as detailed on this page: https://developer.mescius.com/componentone/docs/win/online-truedbgrid/truedbgrid-designer.html.

    When I right-click a TDBGrid in the .NET 8 form designer, the context menu does not contain a “Design” item, so I can’t invoke the editor.

    How can I open this window so that I can maintain the columns and settings of the grid?

    I realise that FlexGrid is the preferred grid now, but unfortunately the amount of work required to migrate will be significant, so sticking with TDBGrid is the only practical option.

    Thanks!

  • Posted 21 June 2024, 3:27 am EST

    Hi Adam,

    Just for your information, Microsoft made significant changes to the design-time architecture starting with .NET 6 and above. As a result, the design-time support for all ComponentOne controls had to be rebuilt from scratch for .NET 6 and later.

    The development team prioritizes design-time support for different C1 controls based on their usage and the volume of customer requests. As you mentioned, since C1FlexGrid is now the preferred grid, we have only provided the .NET Core version of C1TrueDBGrid to support users migrating applications. We are not investing in new development for C1TrueDBGrid, so there are currently no plans to develop complete designer support for it.

    However, the latest .NET Core version of C1TrueDBGrid includes support for the “column collection editor”, which offers features similar to the “column designer” in C1TrueDBGrid for .NET Framework 4.8. Please see the attached screenshot for reference - TdbgDesigner.zip

    We apologize for any inconvenience this has caused and thank you for your understanding.

    Kind Regards,

    Kartik

  • Posted 21 June 2024, 3:40 am EST

    Hi Kartik,

    Thanks very much for getting back to me. Your answer was the one I half expected, but I’d been holding on to a little bit of hope that perhaps I had missed something – oh well!

    Thanks for the suggestion of using the Column Collection editor. I can see that this, alongside the Splits Collection + DisplayColumn Collection editor, does provide most of the functionality required to manage the grid columns, though in a much less convenient fashion.

    If that turns out to be too time-consuming to use, I’m considering writing an external editor that will allow the grid definition to be read, edited and saved directly from/to the PropBag string within the form’s .resx file. That will still be less convenient to use than the .NET Framework in-built designer, but will at least allow me to bring the required functionality all back into a single window.

    Thanks and regards,

    Adam.

  • Posted 21 June 2024, 7:47 am EST

    Hi Adam,

    We are glad that the collection editors could provide some useful functionality for your needs. Please take your time to migrate the project, and feel free to contact us if you encounter any issues.

    Kind Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels