Ticket T336371
Visible to All Users

NullReferenceException is raised when the OrgChartController.OnItemsSourceChanged method is called

created 9 years ago

[DevExpress Support Team: CLONED FROM T332969: How to generate shapes in DiagramControl from a hierarchical source]
Before proceeding to the connectors solution you just provided, I tried to implement the OrgChartController class approach. I made all the needed adjustments to cover the name, key and parent values but now I'm getting the attached runtime error on the stage the controller is getting my data source ("OnItemsSourceChanged" method).
Any ideas why this is happening? All 3 (name, key and parent) fields have values for all the items in the list I'm sending to the class.
Regards,
Andreas

Show previous comments (2)
Alexander Russkov (DevExpress) 9 years ago

    Hi Andreas,
    It's also possible that the ParentMember property points to a property that doesn't exist in your underlying data object.

    Thanks,
    Alexander

    AO AO
    Andreas.Oikonomidis 9 years ago

      Issue is now solved. Thanks a lot for all your help Alexander!

      Alexander Russkov (DevExpress) 9 years ago

        You are welcome, Andreas. I am happy to hear that the issue has been resolved!

        Answers approved by DevExpress Support

        created 9 years ago

        The issue may occur when the ParentMember property points to a property that doesn't exist in the underlying data object or when there is a null value in the source collection.

        Thanks,
        Alexander

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.