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


C# DevExpress.BestFitColumns方法代码示例

本文整理汇总了C#中DevExpress.BestFitColumns方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.BestFitColumns方法的具体用法?C# DevExpress.BestFitColumns怎么用?C# DevExpress.BestFitColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevExpress的用法示例。


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

示例1: ReconfigGridView

        /// <summary>
        /// Reconfig properties of gridview
        /// </summary>
        /// <param name="gridView">GridView</param>
        public static void ReconfigGridView(DevExpress.XtraGrid.Views.Grid.GridView gridView)
        {
            gridView.BestFitColumns();

            if (gridView.OptionsBehavior.ReadOnly)
            {
                gridView.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False;
                gridView.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.False;
                gridView.OptionsBehavior.Editable = false;
            }

            if (gridView.OptionsBehavior.AllowAddRows == DevExpress.Utils.DefaultBoolean.False)
            {
                gridView.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
            }
            else if(gridView.OptionsBehavior.AllowAddRows == DevExpress.Utils.DefaultBoolean.True)
            {
                gridView.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
            }

            gridView.OptionsView.ShowGroupPanel = gridView.OptionsCustomization.AllowGroup;
            gridView.OptionsView.ShowAutoFilterRow = gridView.OptionsCustomization.AllowFilter;

            //if (gridView.OptionsCustomization.AllowFilter == true)
            //    gridView.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.ShowAlways;
            //else
            gridView.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never;
        }
开发者ID:cuongpv88,项目名称:work,代码行数:32,代码来源:GridHelper.cs

示例2: BestFitAllColumns

        public static void BestFitAllColumns(DevExpress.XtraGrid.Views.Grid.GridView gridView)
        {
            gridView.BestFitColumns();

            for (int i = 0; i < gridView.Columns.Count; i++)
            {
                gridView.Columns[i].BestFit();
            }
        }
开发者ID:cuongpv88,项目名称:work,代码行数:9,代码来源:GridHelper.cs

示例3: AgregarRenglonAlGrid

        private void AgregarRenglonAlGrid(DevExpress.XtraGrid.GridControl Grid, DevExpress.XtraGrid.Views.Grid.GridView GV)
        {
            var lstRegistros = (List<ChequeTransferencia>)Grid.DataSource;

            if (lstRegistros.Count >= 0)
            {
                ChequeTransferencia registro = new ChequeTransferencia();
                registro.Identificador = string.Empty;
                registro.Cliente = string.Empty;
                registro.Banco = string.Empty;
                registro.Importe = 0;

                lstRegistros.Add(registro);

                Grid.DataSource = lstRegistros;
                GV.RefreshData();
                GV.BestFitColumns();
            }
        }
开发者ID:desarrollocorrales,项目名称:CorteDeSucursales,代码行数:19,代码来源:FrmChequesTransferencias.cs

示例4: PLGridViewFix

 //PHUOCNT NC Hàm này làm gì ? Còn cần nữa ko
 //TRANGDTT NC Hàm này làm gì ? Còn cần nữa ko
 public static void PLGridViewFix(DevExpress.XtraGrid.Views.Grid.GridView grdView)
 {
     grdView.OptionsSelection.EnableAppearanceFocusedCell = false;
     grdView.OptionsView.EnableAppearanceEvenRow = true;
     grdView.OptionsView.EnableAppearanceOddRow = true;
     //grdView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
     grdView.OptionsView.ShowFooter = true;
     //grdView.OptionsBehavior.Editable = false;
     grdView.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
     grdView.OptionsCustomization.AllowGroup = true;
     grdView.BestFitColumns();
     //XtraGridSupport.ShowNumOfRecord(grdView.GridControl);
     HelpGrid.ShowNumOfRecord(grdView.GridControl);
     for (int i = 0; i < grdView.Columns.Count; i++)
     {
         grdView.Columns[i].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
     }
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:20,代码来源:frmLichLamViecQL.cs


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