Ticket Q537216
Visible to All Users

How to use the grid designer when the grid is inside a UserControl.

created 11 years ago

good morning,
i have a problem with xtradatagrid.
if i insert (drag & drop) my datagrid in a usercontrol i am able to view designer pushing specific botton "Run Designer" or pushing gridcontrol tasks (at the top of the grid).
but if i use this usercontrol (with my datagrid) in another usercontrol or in a form, here i am not able to view designer because doesn't appeare button run designer neither gridcontrol tasks (at the top of the grid).
in which way can i enable this button also in the last usercontrol?

thanks lot

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hi,
This is a standard behavior and you can replicate it without using our controls. However, you can enable the grid's designer by creating an inherited UserControl from your base control with the XtraGrid, configure the grid on it as needed, and then use this inherited UserControl on your forms. The inherited control from the existing UserControl can be created via the Project | Add New Item menu command in Visual Studio. Please check How to use the grid designer when the grid is inside a UserControl. for more information.
Let me know if you have any additional questions.

    Comments (2)

      i have tried but unsecesfully.
      i have created an inherited user control named UcGridInherited from my usercontrol containing xtragrid named UcGridOrig.
      in UcGridOrig i have my xtragrid and other controls.
      using inherited usercontrol in UcGridInherited obtain the same control and here there is run designer and works fine.
      the problem there is if i use UcGridInherited in onother usercontrol (named UcGenerally)
      in this case i have the same control of UcGridInherited but here ther are disable and cannot view run designer .
      i would use run designer and each designer properties in each usercontrol containg UcGridInherited

      Alisher (DevExpress Support) 11 years ago

        Hi Bruno,
        Thank you for the clarification. I'm afraid I misunderstood your goal and provided you with the incorrect information. Visual Studio does not provide access to the control's designer if this control is placed on the UserControl, which is placed on the form. You can reproduce this behavior with standard controls. Unfortunately, there is no solution for this task.

        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.