Bug Report T354568
Visible to All Users

System.NullReferenceException is thrown when a node is dragged and dropped from the standalone DevExpress.XtraReports.UserDesigner.XRDesignFieldList

created 9 years ago (modified 9 years ago)

Hy Devexpress Team,

Im using the XRDesignFieldListControl and when i start Drag something this error appears:

*** System.NullReferenceException ***

Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
StackTrace:    bei DevExpress.XtraReports.Design.FieldListTreeView.OnItemDrag(Object sender, ItemDragEventArgs e)
   bei DevExpress.XtraTreeList.Native.XtraTreeView.ItemMove(Object sender, MouseEventArgs e)
   bei System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
   bei System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
   bei System.Windows.Forms.Control.WmMouseMove(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
   bei DevExpress.XtraTreeList.TreeList.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Can you tell me what's wrong?

Thx,
Alex

Show previous comments (2)
DevExpress Support Team 9 years ago

    Hello Alexander,
    We appreciate you pointing this out. I tested your solution and got the exception under v15.2.5 as well.

    While we are researching this issue, would you please describe your requirements in greater detail? Maybe a standard (I mean, non-embedded) TreeList control will suit your needs? You can populate its node collection against your data source (see Data Binding Modes) and implement the required drag-n-drop operations. Please check our documentation: TreeList.CustomizeNewNodeFromOuterData Event. See also: How to reorder XtraTreeList nodes via drag-and-drop.

    Thanks

    AD AD
    Alexander Dorn 9 years ago

      Hallo Jannet,

      of course a standard TreeList can solve this problem. But I wanted to inform you that an error exists here.

      Thx,
      Alex

      DevExpress Support Team 9 years ago

        We greatly appreciate that, Alexander. You'll receive a notification once we fix the problem.

        Thanks

        Answers approved by DevExpress Support

        created 9 years ago (modified 9 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Additional information:

        We've fixed the problem, and the System.NullReferenceException won't be thrown when a node is dropped.

        IMPORTANT NOTE
        As DevExpress.XtraReports.UserDesigner.XRDesignFieldList was designed to be used along with the WinForms End-User Report Designer, it's expected that a node will be dropped onto the report design surface. A corresponding data bound report control is created based on that: see Using Report Controls.

        If you need to replicate the same functionality but in standalone mode, consider using the TreeList control. Populate its node collection against your data source (see Data Binding Modes) and implement the required drag-n-drop operations. Check our documentation: TreeList.CustomizeNewNodeFromOuterData Event. See also: How to reorder XtraTreeList nodes via drag-and-drop.

          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.