in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

How to embed my own working area?

Last post 8/31/2007 4:23 AM by Dan (Developer Express). 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 8/25/2007 3:22 PM

    How to embed my own working area?

    Hi!

    How to embed my own working area instead of detal/list view with custom user controls when it's clicked standard navbar item, for example, to insert xtrachart or other controls?

    Something like this:

    Example

  • 8/31/2007 4:23 AM In reply to

    Re: How to embed my own working area?

    Answer
    Hi Alexey,
     
    You can achieve this by creating a ListEditor class descendant and specifying it as an Editor for the desired view.
     
    Generally speaking, you can adjust the necessary control at design time:
    - create a new file with an empty Form
    - add the necessary control onto the form
    - add an XPCollection component onto the form and select the necessary object type in the PropertyGrid panel
    - set the control's datasource to the XPCollection component
     
    You can find more details about Xpo design time in our online documentation:
    - "How to: Bind an XPCollection to the Grid" at http://www.devexpress.com/Help/?document=xpo/customdocument2066.htm
     
    At this stage, the control should have all the necessary information from the datasource (primarily, it is a list of available fields), and you can use all the design time features provided by the control.
    After you have designed the control, you can instantiate the Form and retrieve the control from it in the CreateControlsCore method of your ListEditor descendant:
     
        public class MyListEditor : ListEditor {
                protected override object CreateControlsCore()  {
                     Form1 form = new Form1();
                     MyControl myControl = form.Controls.Find("MyControl1", true)[0];
                     myControl.Parent = null;
                     return myControl;
                }
    }

    --
    Thanks, Dan
    R&D, ..NET Team Developer Express Inc.
     
    PS. If you wish to receive direct assistance from our Support Team, use
    Support Center at http://www.devexpress.com/Support/Center
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED