当前位置: 首页>>代码示例>>C#>>正文


C# GridControl类代码示例

本文整理汇总了C#中GridControl的典型用法代码示例。如果您正苦于以下问题:C# GridControl类的具体用法?C# GridControl怎么用?C# GridControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GridControl类属于命名空间,在下文中一共展示了GridControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitializeOutlookGrid

        public GridControl InitializeOutlookGrid(
            GridControl gridOutlookList)
        {
            try
            {
                gridOutlookList.RowCount = 0;
                gridOutlookList.ColCount = 4;
                gridOutlookList.ColWidths[0] = 10;
                gridOutlookList.ColWidths[1] = 200;
                gridOutlookList.ColWidths[2] = 150;
                gridOutlookList.ColWidths[3] = 150;
                gridOutlookList.ColWidths[4] = 0;

                gridOutlookList[0, 1].Text = "Name";
                gridOutlookList[0, 2].Text = "Business Fax";
                gridOutlookList[0, 3].Text = "Home Fax";

                gridOutlookList[0, 1].BackColor = Color.LightGray;
                gridOutlookList[0, 2].BackColor = Color.LightGray;
                gridOutlookList[0, 3].BackColor = Color.LightGray;

                return gridOutlookList;
            }

            catch (Exception er)
            {
                Common.Log(er.Message);
                return gridOutlookList;
            }
        }
开发者ID:connecticutortho,项目名称:ct-ortho-repositories4,代码行数:30,代码来源:GridHelper.cs

示例2: InitializeSendToGrid

        public GridControl InitializeSendToGrid(GridControl gridSendFax,
            string _faxFolder)
        {
            try
            {
                gridSendFax.RowCount = 0;

                gridSendFax.ColCount = 3;
                gridSendFax.ColWidths[0] = 10;
                gridSendFax.ColWidths[1] = 75;
                gridSendFax.ColWidths[2] = 150;
                gridSendFax.ColWidths[3] = 150;

                gridSendFax[0, 1].Text = "Del";
                gridSendFax[0, 2].Text = "Recipient name";
                gridSendFax[0, 3].Text = "Fax number";

                gridSendFax[0, 1].BackColor = Color.LightGray;
                gridSendFax[0, 2].BackColor = Color.LightGray;
                gridSendFax[0, 3].BackColor = Color.LightGray;

                GridModel model = gridSendFax.Model;
                return gridSendFax;
            }
            catch (Exception er)
            {
                Common.Log(er.Message);
                return gridSendFax;
            }
        }
开发者ID:connecticutortho,项目名称:ct-ortho-repositories4,代码行数:30,代码来源:GridHelper.cs

示例3: Create

        public GridColumn[] Create(GridControl gridControl, GridView gridView)
        {
            XtraGridSupportExt.TextLeftColumn(
               XtraGridSupportExt.CreateGridColumn(gridView, "ID", -1, -1), "ID");
            XtraGridSupportExt.TextLeftColumn(
                XtraGridSupportExt.CreateGridColumn(gridView, "Số ĐKCB HD", 0, 150), "NAME");
            XtraGridSupportExt.TextLeftColumn(
               XtraGridSupportExt.CreateGridColumn(gridView, "Mô tả", 1, 500), "NOI_DUNG");
            XtraGridSupportExt.TextLeftColumn(
            XtraGridSupportExt.CreateGridColumn(gridView, "Mục đích", 2, 500), "MUC_DICH");
            HelpGrid.CotSpinEditInt(
               XtraGridSupportExt.CreateGridColumn(gridView, "Dung lượng (MB)", 3, 150), "DUNG_LUONG", true);
            XtraGridSupportExt.TextLeftColumn(
               XtraGridSupportExt.CreateGridColumn(gridView, "Tình trạng", 4, 150), "TINH_TRANG");
            XtraGridSupportExt.TextLeftColumn(
               XtraGridSupportExt.CreateGridColumn(gridView, "Chịu trách nhiệm", 5, 300), "NGUOI_CHIU_TRACH_NHIEM");
            HelpGridColumn.CotMemoExEdit(
               XtraGridSupportExt.CreateGridColumn(gridView, "Ghi chú", 6, 150), "GHI_CHU");
            HelpGridColumn.CotCheckEdit(
                XtraGridSupportExt.CreateGridColumn(gridView, GlobalConst.VISIBLE_TITLE, 7, 60), "VISIBLE_BIT");
            ((PLGridView)gridView).DefaultNewRow = delegate(DataRow row)
             {
                 row["VISIBLE_BIT"] = "Y";
             };

            return null;
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:27,代码来源:DMHardDisks.cs

示例4: SystemParametersController

 public SystemParametersController(AdministrationForm form, GridControl gridControl)
 {
     view = form;
     _gridControl = gridControl;
     _instance = this;
     //identity = Thread.CurrentPrincipal as UserIdentity;//TODO
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:7,代码来源:SystemParametersController.cs

示例5: frmGroup

 public frmGroup(GridControl dv, string flag)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.dvgroup = (DataView)dv.DataSource;
     this.BindCombox();
     this.comboBox1.SelectedIndex = 0;
     this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     this.dataGridView1.ReadOnly = true;
     this.dataGridView1.AllowUserToAddRows = false;
     this.dataGridView1.AllowUserToDeleteRows = false;
     this.dataGridView1.AllowUserToResizeRows = false;
     this.dataGridView1.MultiSelect = false;
     this.dataGridView1.RowHeadersWidth = 55;
     this.dataGridView1.BackgroundColor = this.BackColor;
     this.dataGridView1.EnableHeadersVisualStyles = false;
     this.dataGridView1.AllowUserToResizeColumns = false;
     this.dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     this.dataGridView2.ReadOnly = true;
     this.dataGridView2.AllowUserToAddRows = false;
     this.dataGridView2.AllowUserToDeleteRows = false;
     this.dataGridView2.AllowUserToResizeRows = false;
     this.dataGridView2.MultiSelect = false;
     this.dataGridView2.RowHeadersWidth = 55;
     this.dataGridView2.BackgroundColor = this.BackColor;
     this.dataGridView2.EnableHeadersVisualStyles = false;
 }
开发者ID:wangshu,项目名称:NY_HACK,代码行数:28,代码来源:frmGroup.cs

示例6: GridViewPrinter

        public GridViewPrinter(GridControl aGrid, PrintDocument aPrintDocument, GridView aTable)
        {
            TheDataGrid = aGrid;
            ThePrintDocument = aPrintDocument;
            TheTable = aTable;

            if (aPrintDocument.DefaultPageSettings.Landscape)
            {
                PageWidth = ThePrintDocument.DefaultPageSettings.PaperSize.Height;
                PageHeight = ThePrintDocument.DefaultPageSettings.PaperSize.Width;

                TopMargin = ThePrintDocument.DefaultPageSettings.Margins.Right;
                BottomMargin = ThePrintDocument.DefaultPageSettings.Margins.Left;
                LeftMargin = ThePrintDocument.DefaultPageSettings.Margins.Top;
                RightMargin = ThePrintDocument.DefaultPageSettings.Margins.Bottom;
            }
            else
            {
                PageWidth = ThePrintDocument.DefaultPageSettings.PaperSize.Width;
                PageHeight = ThePrintDocument.DefaultPageSettings.PaperSize.Height;

                TopMargin = ThePrintDocument.DefaultPageSettings.Margins.Top;
                BottomMargin = ThePrintDocument.DefaultPageSettings.Margins.Bottom;
            }
        }
开发者ID:gregggdavis,项目名称:schedww2,代码行数:25,代码来源:GridViewPrinter.cs

示例7: OpenGridViewGroups

 public void OpenGridViewGroups(GridControl ctrl, int groupleveltoexpand)
 {
     // open grouplevel 0 (if available)
     ctrl.BeginUpdate();
     try
     {
         GridView view = (GridView)ctrl.DefaultView;
         //view.ExpandAllGroups();
         view.MoveFirst();
         while (!view.IsLastRow)
         {
             int rowhandle = view.FocusedRowHandle;
             if (view.IsGroupRow(rowhandle))
             {
                 int grouplevel = view.GetRowLevel(rowhandle);
                 if (grouplevel <= groupleveltoexpand)
                 {
                     view.ExpandGroupRow(rowhandle);
                 }
             }
             view.MoveNext();
         }
         view.MoveFirst();
     }
     catch (Exception E)
     {
         Console.WriteLine(E.Message);
     }
     ctrl.EndUpdate();
 }
开发者ID:ChrisPea,项目名称:TuningSuites,代码行数:30,代码来源:SRAMCompareResults.cs

示例8: ConvertControlValue

 /// <summary>
 /// Converts the specified <code>token</code> into an instance of <see cref="IGridControlValue"/>.
 /// </summary>
 /// <param name="control">A reference to the parent <see cref="GridControl"/>.</param>
 /// <param name="token">The instance of <see cref="JToken"/> representing the control value.</param>
 /// <param name="value">The converted control value.</param>
 public bool ConvertControlValue(GridControl control, JToken token, out IGridControlValue value) {
     value = null;
     if (IsLinkPickerEditor(control.Editor)) {
         value = GridControlLinkPickerValue.Parse(control, token as JObject);
     }
     return value != null;
 }
开发者ID:skybrud,项目名称:Skybrud.LinkPicker,代码行数:13,代码来源:LinkPickerGridConverter.cs

示例9: GetControlWrapper

 /// <summary>
 /// Gets an instance <see cref="GridControlWrapper"/> for the specified <code>control</code>.
 /// </summary>
 /// <param name="control">The control to be wrapped.</param>
 /// <param name="wrapper">The wrapper.</param>
 public bool GetControlWrapper(GridControl control, out GridControlWrapper wrapper) {
     wrapper = null;
     if (IsLinkPickerEditor(control.Editor)) {
         wrapper = control.GetControlWrapper<GridControlLinkPickerValue, GridEditorLinkPickerConfig>();
     }
     return wrapper != null;
 }
开发者ID:skybrud,项目名称:Skybrud.LinkPicker,代码行数:12,代码来源:LinkPickerGridConverter.cs

示例10: GetControlWrapper

        /// <summary>
        /// Gets an instance <code>GridControlWrapper</code> for the specified <code>control</code>.
        /// </summary>
        /// <param name="control">The control to be wrapped.</param>
        /// <param name="wrapper">The wrapper.</param>
        public virtual bool GetControlWrapper(GridControl control, out GridControlWrapper wrapper) {

            wrapper = null;
            
            switch (control.Editor.Alias) {

                case "media":
                    wrapper = control.GetControlWrapper<GridControlMediaValue, GridEditorMediaConfig>();
                    break;

                case "embed":
                    wrapper = control.GetControlWrapper<GridControlEmbedValue>();
                    break;

                case "rte":
                    wrapper = control.GetControlWrapper<GridControlRichTextValue>();
                    break;

                case "macro":
                    wrapper = control.GetControlWrapper<GridControlMacroValue>();
                    break;

                case "quote":
                case "headline":
                    wrapper = control.GetControlWrapper<GridControlTextValue, GridEditorTextConfig>();
                    break;

            }

            return wrapper != null;

        }
开发者ID:skybrud,项目名称:Skybrud.Umbraco.GridData,代码行数:37,代码来源:UmbracoGridConverter.cs

示例11: GetMemoTextBox

        /// <summary>
        /// 
        /// </summary>
        /// <param name="gridControl"></param>
        /// <returns></returns>
        public static WinTextBox GetMemoTextBox(GridControl gridControl)
        {
            if (m_memoTextBox == null || m_memoTextBox.IsDisposed)
            {
                WinTextBox memoTextBox = new WinTextBox(EnhancedBorderStyle.None);
                //WinButton moreButton = new WinButton(new Xceed.Editors.ButtonType(Xceed.Editors.ButtonBackgroundImageType.Combo, Xceed.Editors.ButtonImageType.ScrollDown));
                //memoTextBox.SideButtons.Add(moreButton);
                //memoTextBox.DropDownButton = moreButton;

                memoTextBox.TextBoxArea.WordWrap = false;
                memoTextBox.TextBoxArea.Multiline = false;
                memoTextBox.TextBoxArea.AcceptsReturn = false;
                memoTextBox.TextBoxArea.ReadOnly = false;

                WinTextBox multilineTextBox = new WinTextBox();
                multilineTextBox.TextBoxArea.WordWrap = true;
                multilineTextBox.TextBoxArea.Multiline = true;
                multilineTextBox.TextBoxArea.ReadOnly = true;

                memoTextBox.DropDownAnchor = DropDownAnchor.Left;
                memoTextBox.DropDownDirection = DropDownDirection.Automatic;
                memoTextBox.DropDownAllowFocus = true;
                memoTextBox.DropDownControl = multilineTextBox;
                memoTextBox.DropDownSize = new System.Drawing.Size(300, 150);
                memoTextBox.DroppedDownChanged += new EventHandler(memoTextBox_DroppedDownChanged);

                m_memoTextBox = memoTextBox;
            }
            SetMemoTextBoxParent(m_memoTextBox, gridControl);
            return m_memoTextBox;
        }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:36,代码来源:MultiLineViewer.cs

示例12: ToPLGridViewUpdate

        //Chú ý tên table trong DataTable phải giống như tên table mà mình cần thao tác thêm xóa
        public static PLGridViewUpdate ToPLGridViewUpdate(GridControl grid, PLGridView gridView,
            DataTable DataSource, string IDField, string[] NameFields, string[] Subjects,
            InitGridColumns InitGridCol, GetRule Rule,
            DelegationLib.DefinePermission permission,
            PLDelegation.ProcessDataRow InsertFunc, PLDelegation.ProcessDataRow DeleteFunc,
            PLDelegation.ProcessDataRow UpdateFunc, int RowPerPage)
        {
            PLGridViewUpdate update = new PLGridViewUpdate();
            for (int i = 0; i < gridView.Columns.Count; i++)
            {
                update.gridView.Columns.Add(gridView.Columns[i]);
            }

            update._init(DataSource, IDField, NameFields, Subjects, InitGridCol, Rule,
                        permission, InsertFunc, DeleteFunc, UpdateFunc);

            PLGridViewUpdateHelp page = new PLGridViewUpdateHelp(update.gridControl, RowPerPage, update);
            page.AddFunction = update.AddAction;
            page.DeleteFunction = update.DeleteAction;
            page.EditFunction = update.EditAction;
            page.NoSaveFunction = update.NoSaveAction;
            page.PrintFunction = update.PrintAction;
            page.SaveFunction = update.SaveAction;

            update.Dock = grid.Dock;
            update.Location = grid.Location;

            return update;
        }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:30,代码来源:PLGridViewUpdate.cs

示例13: GetControlWrapper

        /// <summary>
        /// Gets an instance <code>GridControlWrapper</code> for the specified <code>control</code>.
        /// </summary>
        /// <param name="control">The control to be wrapped.</param>
        /// <param name="wrapper">The wrapper.</param>
        public bool GetControlWrapper(GridControl control, out GridControlWrapper wrapper) {

            wrapper = null;

            switch (control.Editor.Alias) {

                case "media_wide":
                case "media_wide_cropped":
                    wrapper = control.GetControlWrapper<GridControlMediaValue, GridEditorMediaConfig>();
                    break;

                case "banner_headline":
                case "banner_tagline":
                case "headline_centered":
                case "abstract":
                case "paragraph":
                case "quote_D":
                case "code":
                    wrapper = control.GetControlWrapper<GridControlTextValue, GridEditorTextConfig>();
                    break;
            
            }

            return wrapper != null;

        }
开发者ID:skybrud,项目名称:Skybrud.Umbraco.GridData,代码行数:31,代码来源:FanoeGridConverter.cs

示例14: CreateDM_DANH_BA

        public GridColumn[] CreateDM_DANH_BA(GridControl gridControl, GridView gridView)
        {
            HelpGridColumn.CotTextLeft(
                HelpGridColumn.ThemCot(gridView, "ID", -1, -1), "ID");
            HelpGridColumn.CotTextLeft(
                HelpGridColumn.ThemCot(gridView, "Tên tài liệu", 0, 150), "NAME");
            HelpGridColumn.CotTextLeft(
                HelpGridColumn.ThemCot(gridView, "Địa chỉ", 1, 150), "DIA_CHI");
            HelpGridColumn.CotTextLeft(
              HelpGridColumn.ThemCot(gridView, "Số điện thoại", 2, 150), "SO_DIEN_THOAI");
            HelpGridColumn.CotTextLeft(
            HelpGridColumn.ThemCot(gridView, "Di động", 3, 150), "DI_DONG");
            HelpGridColumn.CotTextLeft(
              HelpGridColumn.ThemCot(gridView, "Fax", 4, 150), "SO_FAX");
            HelpGridColumn.CotTextLeft(
              HelpGridColumn.ThemCot(gridView, "Người đại diện", 5, 150), "NGUOI_DAI_DIEN");
            HelpGridColumn.CotTextLeft(
              HelpGridColumn.ThemCot(gridView, "Chức vụ", 6, 150), "CHUC_VU");

            HelpGridColumn.CotTextLeft(
              HelpGridColumn.ThemCot(gridView, "Số tài khoản", 7, 150), "TAI_KHOAN");
            XtraGridSupportExt.ComboboxGridColumn(HelpGridColumn.ThemCot(gridView, "Ngân hàng", 1, 150), " DM_BANK", "ID", "NAME", "TEN_NGAN_HANG").NullText = string.Empty;
            gridView.OptionsView.ColumnAutoWidth = false;
            gridView.OptionsView.ShowAutoFilterRow = false;
            gridView.OptionsView.ShowGroupedColumns = false;
            gridView.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never;

            ((PLGridView)gridView).DefaultNewRow = ProtocolVN.Framework.Win.HelpGrid.CheckVisibleDefault;
            ((PLGridView)gridView)._SetUserLayout();
            return null;
        }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:31,代码来源:DMDanhBa.cs

示例15: CreateDM_NHAN_VIEN

 public GridColumn[] CreateDM_NHAN_VIEN(GridControl gridControl, GridView gridView)
 {
     XtraGridSupportExt.TextLeftColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "ID", -1, -1), "ID");
     XtraGridSupportExt.TextLeftColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "Mã nhân viên", 0, 150), "MA_NV");
     GridColumn Ten = XtraGridSupportExt.CreateGridColumn(gridView, "Tên nhân viên", 1, 150);
     XtraGridSupportExt.TextLeftColumn(
         Ten, "NAME");
     GridColumn ColPhongBan = XtraGridSupportExt.CreateGridColumn(gridView, "Tên phòng ban", 2, 150);
     ColPhongBan.FieldName = "DEPARTMENT_ID";
     //XtraGridSupportExt.IDGridColumn(ColPhongBan, "ID", "NAME", "DEPARTMENT", "DEPARTMENT_ID");
     HelpGridColumn.CotCombobox(ColPhongBan, HelpDB.getDatabase().LoadDataSet(@"SELECT *
                                     FROM DEPARTMENT WHERE PARENT_ID IS NOT NULL"), "ID", "NAME", "DEPARTMENT_ID");
     ColPhongBan.OptionsColumn.AllowEdit = true;
     ColPhongBan.OptionsColumn.AllowFocus = false;
     ColPhongBan.OptionsColumn.ReadOnly = true;
     Ten.SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
     XtraGridSupportExt.TextLeftColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "CMND", 3, 150), "CMND");
     XtraGridSupportExt.DateTimeGridColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "Ngày sinh", 4, 150), "NGAY_SINH");
     XtraGridSupportExt.TextLeftColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "Điện thoại", 5, 150), "DIEN_THOAI");
     XtraGridSupportExt.TextLeftColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "Địa chỉ", 6, 150), "DIA_CHI");
     XtraGridSupportExt.TextLeftColumn(
         XtraGridSupportExt.CreateGridColumn(gridView, "Email", 7, 150), "EMAIL");
     HelpGridColumn.CotCheckEdit(
         XtraGridSupportExt.CreateGridColumn(gridView, "Hiển thị", 8, 100), "VISIBLE_BIT");
     gridView.OptionsView.ShowGroupedColumns = false;
     gridView.HorzScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Always;
     gridView.OptionsView.ColumnAutoWidth = true;
     return null;
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:35,代码来源:frmAddEmployee.cs


注:本文中的GridControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。