Error binding truedb grid to objects

Posted by: carlos.taracena on 11 May 2018, 2:53 am EST

    • Post Options:
    • Link

    Posted 11 May 2018, 2:53 am EST

    Hello,

    I’m trying to bind a form to an object with a List property. The List property has to be bound to a TrueDB Grid but I get an exception System.ArgumentException: DataMember property ‘XXX’ cannot be found on the DataSource when the XX.design.cs file hits the line that asignes the data source to the control.

    The objects are defined like:

    Class A with property List myList

    The binding sources are defined like

    bsA.DataSource = typeof(ClassA)

    bsB.DataSource = bsA

    bsB.DataMember = “myList”

    This was working fine in old versions and I’ve been postponing the upgrade for a long time so see if this issue was fixed, but we need to use some of the new functionality and we have to upgrade. There is a work around that I have commented in the project attached, but it is not a valid solution because the project is very large.

    Please, we need an answer asap.

    The project is in VisualStudio 2017 with .net 4.6.2 and C1TrueDBGrid 4.0.20181.303.

    Thank you.

  • Posted 13 May 2018, 10:05 pm EST

    Hello,

    It seems the project did not attach properly, this might be because your project exceeded the maximum allowed file size(5 Mb). In that case, please use the following URL for uploading your project: https://www.dropbox.com/request/Dm5zQaQs6SB6txlF0Ntb

    Thanks,

    Ruchir Agarwal

  • Posted 18 May 2018, 10:02 am EST

    Hello,

    Any updates? I send the project to the link that you provided on the 14th and I haven’t heard from you.

    Thank you.

  • Posted 20 May 2018, 7:57 pm EST

    Hi!

    Apologies for the delay in getting back to you.

    Yes, I am able to see the exception with the latest build at my end too. Since I’m not sure about the last version that you were using. So, can you please tell me last version with which this project was working fine? It might help us in further investigation of this issue.

    Best regards,

    Meenakshi

  • Posted 25 May 2018, 4:22 am EST

    Hello,

    It was version 4.0.2014.61532. After that version it stop working.

    Thank you

  • Posted 28 May 2018, 10:25 pm EST

    Hello Carlos,

    Could you please resend your sample again here.

    Thanks,

    Mohit

  • Posted 8 June 2018, 6:16 pm EST

    Here it is

    TestTrueDBApp.zip

  • Posted 11 June 2018, 8:40 pm EST

    Hello Carlos,

    Due to “BeginInit” or “EndInit” method of officesBindingSource, designer environment to prevent the control from being used before it is fully initialized. Hence, could you please assigned “Offices” as a DataMember of “officesBindingSource” after assigning “officesBindingSource” as Datasource to the “officesGrid” Grid.

    Hope it resolves your issue.

    Thanks,

    Mohit

  • Posted 19 June 2018, 4:58 am EST

    Hello Mohit,

    That is what I’ve been doing, but the problem is that the code is in the designer.cs file and it gets generate every time there is a change in the design of the form. The code gets re-arrange and stops working. The code has to be in the designer file to be able to use it for the formatting of the grid and it cannot be moved to de .cs file.

    This is not a solution, it is a temporary fixed that is not sustainable.

    Thank you.

  • Posted 20 June 2018, 10:23 pm EST

    Hello,

    I have escalated this to the development team(Tracking ID 328747) and will revert you back once have any information from them.

    Thanks

    Mohit

  • Posted 15 November 2018, 6:32 pm EST

    Hi Carlos!

    The exception no longer occurs if the same application is run with the latest builds of 2018v3. To check the fix, you can download the builds from here: http://prerelease.componentone.com/dotnet40/c1winforms/2018-t3/C1WinForms.4_4.0.20183.338.zip or update using C1Live utility.

    Regards,

    Meenakshi

  • Posted 8 January 2019, 4:13 am EST

    Hi Meenakshi,

    I finally had time to test it and it works!

    Thank you.

  • Posted 17 April 2020, 2:03 am EST - Updated 3 October 2022, 2:59 pm EST

    Hello Carlos,

    We really regret that you are facing the same issue.

    However, in order to help you at the earliest, upon using the said build 4.0.20201.416 and running your shared application no exception is thrown at my end. I have also prepared a video showing the steps, so that you could confirm and guide if we’re missing anything here.

    I understand your frustration regarding the concern but we request you to help us trace the issue so that we can help you at the earliest.

    With regards,

    Ruchir

Need extra support?

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

Learn More

Forum Channels