'DropDownForm' is not a member of 'C1DropDownControl' in .NET 5

Posted by: zhenyan.zhao on 19 July 2021, 6:53 pm EST

    • Post Options:
    • Link

    Posted 19 July 2021, 6:53 pm EST

    Hi, I’m trying to replace C1DropDownControl with “Assembly C1.Win.Input.5, Version=5.0.20211.502” in my project. C1DropDownControl was with “Assembly C1.Win.C1Input.2, Version=2.0.20101.33244”.

    I have deleted the reference to C1.Win.C1FlexGrid.2 and C1.Win.C1Input.2. I have also downloaded and installed .NET 5 version of C1.Win.FlexGrid and C1.Win.Input through Nuget package. The project cannot compiled successfully.

    I got the error saying ‘DropDownForm’ is not a member of ‘C1DropDownControl’.

    Can anyone help me out ? Is there any demo video and tutorial can guide me through Component One WinForms .NET 5 controls upgrading process?

    Thanks,

    PS: attachment

  • Posted 20 July 2021, 12:09 am EST

    Hi,

    In C1DropDownControl for NET5, instead of the dropdown form, you can now set a custom control that can be hosted on the DropDown control using the Control property in C1DropDownControl class.

    You can refer to the documentation at https://www.grapecity.com/componentone/docs/win/online-input5/dropdown-control.html, it shows how you can use the new C1DropDownControl for NET5.

    Regards

    Avnish

  • Posted 20 July 2021, 6:24 pm EST

    Do you have any sample code project (preferred VB.NET) to demo C1DropDownControl class and DropDownForm class both under C1.Win.Input namespace working together?

    Thanks,

  • Posted 21 July 2021, 12:36 am EST

    Hi,

    The DropDownForm class is used internally by the C1DropDownControl to create the dropdown. You can use a control directly or create a user control and then host that in the dropdown by assigning it to the Control property. You can refer to the installed sample located at C:\Users\user_name\Documents\ComponentOne Samples\WinForms\v5.0\Input.

    Regards

    Avnish

  • Posted 3 August 2021, 6:35 pm EST

    I can find the path C:\Users\user_name\Documents\ComponentOne Samples\Studio for WinForms. I couldn’t the path C:\Users\user_name\Documents\ComponentOne Samples\WinForms\v5.0 on my machine.

    I installed Component One .NET 5 controls through Nuget package.

    How can I download the samples for .NET 5 controls?

    Thanks,

  • Posted 4 August 2021, 2:27 am EST

    Hi,

    The samples are installed when you install the C1 Controls from the C1ControlPanel and check the “Install Samples” option from the right pane.

    If you do not have the samples installed then you can do a repair install with the “NET 5 Controls” and “Install Samples” option checked in the right pane in C1ControlPanel. Once the installation is done, you can find the samples at the location mentioned before.

    C1ControlPanel Download : https://www.grapecity.com/componentone/download

    Regards

    Avnish

  • Posted 9 August 2021, 6:22 pm EST

    I checked the sample at C:\Users\user_name\Documents\ComponentOne Samples\WinForms\v5.0\Input\CS\InputExplorer\Samples\DropDownControl.cs.

    It appears that no DropDownForm is used in the sample. Just wonder if we are still able to keep DropDownForm in my legacy project. If so, do you have any sample which is involved with DropDownForm class?

    I got the following error when I tried open any control or form in designer mode from the sample project. Any advice on that?

    BTW, do we have any VB.NET sample in WinForms v5.0? Thanks.

  • Posted 9 August 2021, 6:24 pm EST

  • Posted 10 August 2021, 3:00 am EST

    Hi,

    The issue has been resolved in the 21v2 release. Please update your references to the latest version to avoid this issue.

    You can keep using the DropDownForm property in the NET4.5.2 version of controls. In NET5, as we mentioned before, the DropDownForm property has been replaced with the Control property. You can use a control directly or create a user control and then host that in the dropdown by assigning it to the Control property.

    We have attached a NET5 VB.NET sample.

    Regards

    Avnish

    DropDownControl.zip

  • Posted 10 August 2021, 5:22 pm EST

  • Posted 10 August 2021, 5:28 pm EST

    I tried on your attached a NET5 VB.NET sample in visual studio enterprise 2019 v16.9.8 and got the same error. The C1.Win.Input version is 5.0.20212.513. I’ve also installed the latest Component One.

  • Posted 10 August 2021, 5:28 pm EST

  • Posted 10 August 2021, 11:08 pm EST

    Hi,

    Microsoft did breaking changes in the core designer of VS 2019 v16.9 and then again for VS 2019 v16.10.

    Due to the changes in v16.9, the builds released before 21v1 became incompatible with the VS 2019 v16.9 or higher, and when later builds were made compatible with 16.9 they became incompatible with the lower version.

    Again breaking changes were done by Microsoft in 16.10, so the same happened with the 21v1 build, they became incompatible with VS 16.10 and the later release 21v2 which is made compatible with 16.10 is not compatible with lower VS versions.

    So Please use the 21v2 release with the latest VS version 16.10 and if you want to use VS version 16.9 then you can use the 21v1 release.

    Regards

    Avnish

  • Posted 19 August 2021, 7:39 pm EST

  • Posted 19 August 2021, 7:49 pm EST

    I upgrade VS to 16.11 with Component One version 5.0.20212.513. Now I am able to open some controls in designer.

    I try to open NumericEdit in samples in designer and got the following error.

    PS: error

    Could not load file or assembly "System, version= 4.0.0.0

  • Posted 20 August 2021, 2:14 am EST

    Hello,

    We too can observe the issue and escalated this to the developers. We will let you know the updates soon.

    Regards,

    Prabhat Sharma.

  • Posted 27 August 2021, 5:20 am EST

    Hi,

    As per the development team, This is a Microsoft issue with WinForms Core Designer. The development team has posted this issue to their repository.

    As a workaround you can do the following steps:

    • Close Visual Studio instance;
    • Remove bin and obj folder from the root of the C1Input 5 product sample;
    • Open “InputExplorer.csproj” file in some text editor, like Notepad++.
    • Remove this line: win-x86
    • Open the project in Visual Studio.
    • Build the project.
    • Open NumericEdit user control.

    This should resolve your issue.

    Regards

    Avnish

  • Posted 27 August 2021, 5:22 am EST

Need extra support?

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

Learn More

Forum Channels