Ticket T217610
Visible to All Users

Ribbon Button and User Control

created 10 years ago

Hello,

Hoping you can help with this, what I am trying to do is to get a 'Save' button on the main forms Ribbon control to carry out a Save Sub Procedure in a Data Bound XtraUserControl with a DataLayout control on it loaded in a Devexpress Splitcontainer control. Can you advise and modify my attached code on the most efficient way of doing this (Using VB.NET).

Thanks In Advance.

Answers approved by DevExpress Support

created 10 years ago (modified 10 years ago)

Hi Sansoa,

As far as I understand, you wish to get an access to a XtraUserControl placed on a SplitContainerControl's panel. If so, use the SplitContainerControl Panel's Find method to find the added UserControl in the collection of Panel controls. I have created a simple project to illustrate this. Please check it.

Let me know if you have additional questions.

    Comments (3)

      Hi Alisher,
      Although this does call the Save Sub Procedure, the statement If Me.DataSet1.HasChanges() in the Save procedure returns false when changes are made to values in the bound controls, I am guessing because this is because scControl is another instance of XtraControl1?
      Would you know of a way making this work correctly?
      Thanks In Advance.

        Hi Alisher,
        Having recreated the project using a SQL-Server database it does work correctly,
        So I would put it down to an issue with the with the way Visual Studio interacts with Access databases.
        So thanks very much!

        Alisher (DevExpress Support) 10 years ago

          Great! I'm happy to hear that the issue is resolved. Feel free to contact us in case of further difficulties.

          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.