Bug Report T257588
Visible to All Users

LayoutControl - Copying and pasting layout items duplicates binding sources

created 10 years ago

When I copy and paste layout items inside the same form it is also duplicating bindingsource and datasets in the form.

Let's say I have dataset1 and bindingSource1 and textEdit1. textEdit1 is bound to some field of bindingSource1.
When I copy and paste textEdit1, it generates textEdit2, but also dataset2 and bindingSource2.
Why is duplicating the datasource? This is very annoying, I have to manually change the databind of textEdit2 and set it again to bindingSource1 and delete bindingSource2 and dataset2.

Could this behaviour be improved? I think that when creating textEdit2 it should first check if datasource exists in the destination form and If it does don't create new datasources, and bind the new control to the same datasource as the copied control.

Show previous comments (1)
A A
Albert Mata Viñuales 9 years ago

    Hello, any news about this?
    The copy & paste layout items feature is not so useful if we end with tons of duplicate datasets and binding sources.

    DevExpress Support Team 9 years ago

      Hi,

      We did not change the current behavior. Our developers are investigating a way to find an optimal solution that will cover most of the scenarios without introducing any side effects. We will update this thread once we have results to share with you.

      A A
      Albert Mata Viñuales 9 years ago

        Ok thank you.
        Maybe when pasting controls with databinding it could ask for options:

        1. Duplicate datasources ( existing behaviour )
        2. Reuse existing datasources
        3. Paste without databindings
          Just and idea.

        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:

        Now, only layout items with controls will be copied without any data bindings. Thus, BindingSources will not be copied either.

          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.