Example #1
0
 public GridButtonClicked_EventArgs(DevExpress.XtraGrid.Views.Layout.LayoutView layoutView,
                                    int rowHandle,
                                    object rowObject)
 {
     _rowHandle  = rowHandle;
     _layoutView = layoutView;
     _rowObject  = rowObject;
 }
Example #2
0
 public ScrollInfo(LayoutViewAutoScrollHelper owner, DevExpress.XtraGrid.Views.Layout.LayoutView view)
 {
     _owner      = owner;
     _view       = view;
     ScrollTimer = new Timer {
         Interval = 500
     };
     ScrollTimer.Tick += scrollTimer_Tick;
 }
Example #3
0
 private void UnsubscribeLayoutViewEvents()
 {
     if (_layoutView != null)
     {
         _layoutView.ShowCustomization -= layoutView_ShowCustomization;
         _layoutView.HideCustomization -= layoutView_HideCustomization;
         _layoutView = null;
     }
 }
Example #4
0
 private void SubscribeLayoutViewEvents()
 {
     if (ListEditor != null)
     {
         _layoutView = (DevExpress.XtraGrid.Views.Layout.LayoutView)ListEditor.ColumnView;
         _layoutView.ShowCustomization += layoutView_ShowCustomization;
         _layoutView.HideCustomization += layoutView_HideCustomization;
     }
 }
Example #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.GridControl dataGrid = new DevExpress.XtraGrid.GridControl();
            DevExpress.XtraGrid.Views.Layout.LayoutView LayoutView1 = new DevExpress.XtraGrid.Views.Layout.LayoutView();
            dataGrid.MainView = LayoutView1;

            //DevExpress.XtraEditors.Repository.RepositoryItemTextEdit reptextedit = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            //DevExpress.XtraGrid.Views.Layout.LayoutViewField Fd_col1 = new DevExpress.XtraGrid.Views.Layout.LayoutViewField();

            //
            // layoutViewField_colAddress
            //
            //Fd_col1.EditorPreferredWidth = 127;
            //Fd_col1.Location = new System.Drawing.Point(0, 0);
            //Fd_col1.Name = "layoutViewField_colAddress";
            //Fd_col1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
            //Fd_col1.Size = new System.Drawing.Size(197, 22);
            //Fd_col1.Spacing = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
            //Fd_col1.TextSize = new System.Drawing.Size(43, 13);

            DevExpress.XtraGrid.Columns.LayoutViewColumn col1 = new DevExpress.XtraGrid.Columns.LayoutViewColumn();
            //
            // colAddress
            //
            col1.Caption = "编号";
            //col1.ColumnEdit = reptextedit;
            col1.CustomizationCaption = "编号";
            col1.FieldName = "ID_A";
            //col1.LayoutViewField = Fd_col1;
            col1.Name = "colno";
            col1.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False;
            col1.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            col1.OptionsFilter.AllowFilter = false;

            LayoutView1.Columns.Add(col1);
            // dataGrid.RepositoryItems.Add(reptextedit);
            //ACodeGrid dataGrid= new ACodeGrid ();
            // EditGridLayout dataGrid = new EditGridLayout();
            dataGrid.Dock = DockStyle.Fill;
            //dataGrid.Prdknd = "04";

            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(dataGrid);

            //dataGrid.SetCaption("ZZ_ACODE");
            DataTable dt = CWData.ServerFactory.GetServer().GetDataTable("select * from ZZ_ACODE");
            dataGrid.DataSource = dt;
        }
Example #6
0
 public LayoutViewAutoScrollHelper(DevExpress.XtraGrid.Views.Layout.LayoutView view)
 {
     _fGrid       = view.GridControl;
     _fView       = view;
     _fScrollInfo = new ScrollInfo(this, view);
 }
Example #7
0
 public MyLayoutViewInfo(DevExpress.XtraGrid.Views.Layout.LayoutView view)
     : base(view)
 {
 }
Example #8
0
 public MyLayoutViewHandler(DevExpress.XtraGrid.Views.Layout.LayoutView view)
     : base(view)
 {
 }
Example #9
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.gridControl1               = new DevExpress.XtraGrid.GridControl();
     this.layoutView1                = new DevExpress.XtraGrid.Views.Layout.LayoutView();
     this.layoutViewCard1            = new DevExpress.XtraGrid.Views.Layout.LayoutViewCard();
     this.repositoryItemPictureEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit();
     ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutView1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutViewCard1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.repositoryItemPictureEdit1)).BeginInit();
     this.SuspendLayout();
     //
     // gridControl1
     //
     this.gridControl1.AllowDrop = true;
     this.gridControl1.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.gridControl1.Location  = new System.Drawing.Point(0, 0);
     this.gridControl1.MainView  = this.layoutView1;
     this.gridControl1.Name      = "gridControl1";
     this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
         this.repositoryItemPictureEdit1
     });
     this.gridControl1.Size     = new System.Drawing.Size(847, 608);
     this.gridControl1.TabIndex = 0;
     this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
         this.layoutView1
     });
     this.gridControl1.DragOver     += new System.Windows.Forms.DragEventHandler(this.gridControl1_DragOver);
     this.gridControl1.DragDrop     += new System.Windows.Forms.DragEventHandler(this.gridControl1_DragDrop);
     this.gridControl1.GiveFeedback += new System.Windows.Forms.GiveFeedbackEventHandler(this.gridControl1_GiveFeedback);
     //
     // layoutView1
     //
     this.layoutView1.GridControl = this.gridControl1;
     this.layoutView1.Name        = "layoutView1";
     this.layoutView1.OptionsBehavior.Editable = false;
     this.layoutView1.TemplateCard             = this.layoutViewCard1;
     this.layoutView1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.layoutView1_MouseMove);
     this.layoutView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.layoutView1_MouseDown);
     //
     // layoutViewCard1
     //
     this.layoutViewCard1.CustomizationFormText = "layoutViewCard1";
     this.layoutViewCard1.ExpandButtonLocation  = DevExpress.Utils.GroupElementLocation.AfterText;
     this.layoutViewCard1.Name = "layoutViewCard1";
     this.layoutViewCard1.Text = "layoutViewCard1";
     //
     // repositoryItemPictureEdit1
     //
     this.repositoryItemPictureEdit1.Name = "repositoryItemPictureEdit1";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(847, 608);
     this.Controls.Add(this.gridControl1);
     this.Name  = "Form1";
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutView1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutViewCard1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.repositoryItemPictureEdit1)).EndInit();
     this.ResumeLayout(false);
 }