Bug Report T944899
Visible to All Users

TdxCustomGalleryControl descendants - The "Invalid typecast" error occurs on creating a control's handle after removing a gallery item when this control still has no handle

created 4 years ago

Hello,
i've found a little bug in the latest DX version. It starts to appears in our application in version 2020-I. In the previous version (2019-II) the exception didn't appear.

I've made a sample project, where you can simulate it.

Run the sample project, click on the application button, so the backstage view appears. Then close the backstage view and click on the application button again. For this time the exception is raised.

WorkAround:

  1. The backstage view has to be placed on separate form (it relates with creating new handle when backstage view appears).
  2. On CloseUp event its items has to be cleared.
  3. It somehow relates with TdxGalleryControlViewInfo.ItemViewInfo items. In the TdxGalleryControlViewInfo.CalculateMaxItemTextAreaSizeLimitedByRowCount there are ViewInfoItems still linked to the original (cleared) group items that have already been destroyed.

Regards, Jaroslav

Show previous comments (1)
DevExpress Support Team 4 years ago

    Hello Jaroslav,

    Would you mind if we publish this ticket so that other customers could find this thread? We can protect the privacy of your data by removing your attachment.
    Just let us know if it must be removed.

      Hello Mikhail,
      there's nothing that has to be removed. Feel free to publish this ticket.

      J

      DevExpress Support Team 4 years ago

        Thanks. Published.

        Answers approved by DevExpress Support

        created 4 years ago

        We have addressed the issue described in this ticket and will include a fix in our next maintenance update. To apply this solution before official release, request a hotfix by clicking the appropriate version link.

        Note: Hotfixes may be unavailable for betas/updates set for release within a week.

          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.