Bug Report T303064
Visible to All Users

CollectionDefinition shows undeclared properties after adding (removing) an element

created 9 years ago

[DevExpress Support Team: CLONED FROM T302998: PropertyGrid collection editor shows additional properties]
Hi,

I have 2 property grid related questions:

  1. When binding to an ObservableCollection<DateTime>, after adding a few DateTime objects to the collection in the UI, the Count property suddenly appears within the collection editor field. How can i restrict the collection editor to show the DateTime objects only?

Please, use the attached example to reproduce the issues above.

Comments (3)
Andrey K (DevExpress Support) 9 years ago

    Hi,

    This behavior seems incorrect. I have passed this thread to our R&D team for further research. Once we have any news, we will update the ticket.

    Thanks,
    Andrey

      I encountered the same problem. The propertygridcontrol shows the capacity and count property if the list doesn't contain items. Is there a solution for this problem yet?

      Andrey Marten (DevExpress Support) 9 years ago

        Hello Walter,

        Our developers are working on this issue. Please add this thread to your favorites, and you will be informed once we have any news and update this thread.

        Thanks,
        Andrey

        Answers approved by DevExpress Support

        created 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.

          Show previous comments (1)
          Andrey Marten (DevExpress Support) 9 years ago

            Hello Artem,

            I tried to reproduce this behavior in your sample, but did not succeed (see the attached screencast). Would you please clarify steps I should do to see the Count property in the PropertyGridControl? I'm looking forward to your response.

            Thanks,
            Andrey

              Indeed, the sample i sent to you doesn't have this behavior, but my application does.
              I spent some time finding the root-cause, and it seems that if AllowExpanding="Force" the Count property will appear when the collection is empty.
              This must have been in my code for a while, and i guess my intent was to try to automatically expand the collection property. Obviously, it doesn't work that way, in fact i'm not even sure what it does, so i can just remove it from my code, but like i said, showing Count=0 doesn't bother me at all.

              Andrey Marten (DevExpress Support) 9 years ago

                Hello Artem,

                Thank you for the additional information. I think this behavior should be researched by our developers. I've created a separate thread for this purpose and forwarded it to our R&D team: CollectionDefinition shows undeclared properties after all items are deleted if the PropertyGridControl.AllowExpanding property is set to Force. We will update it as soon as we have any news.

                Thanks,
                Andrey

                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.