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


C# GridView.ClearColumnErrors方法代码示例

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


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

示例1: ValidateInspection

        private void ValidateInspection(GridView view, string NameColumn, ValidateRowEventArgs e)
        {
            string Name = (string)view.GetRowCellValue(e.RowHandle, NameColumn);

            view.ClearColumnErrors();

            if(String.IsNullOrEmpty(Name))
            {
                view.SetColumnError(inspectorsGridColumn,
                   Program.LanguageManager.GetString(StringResources.SelectInspectorsForTestResult));
                e.Valid = false;
            }
        }
开发者ID:SalamanderSunburn,项目名称:prizm,代码行数:13,代码来源:SpoolsXtraForm.cs

示例2: ValidatePersonName

        void ValidatePersonName(GridView view, GridColumn firstNameColumn, GridColumn lastNameColumn, ValidateRowEventArgs e)
        {

            string firstName = (string)view.GetRowCellValue(e.RowHandle, firstNameColumn);
            string lastName = (string)view.GetRowCellValue(e.RowHandle, lastNameColumn);

            view.ClearColumnErrors();

            if (String.IsNullOrEmpty(firstName))
            {
                view.SetColumnError(firstNameColumn,
                    Program.LanguageManager.GetString(StringResources.Settings_ValueRequired));
                e.Valid = false;
            }

            if (String.IsNullOrEmpty(lastName))
            {
                view.SetColumnError(lastNameColumn,
                   Program.LanguageManager.GetString(StringResources.Settings_ValueRequired));
                e.Valid = false;
            }
        }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:22,代码来源:SettingsXtraForm.cs

示例3: SetupView

 /// <summary>
 /// Resets view appearance
 /// </summary>
 /// <param name="view"></param>
 private void SetupView(GridView view)
 {
     view.ClearColumnErrors();
     view.OptionsView.EnableAppearanceEvenRow = false;
     view.OptionsView.EnableAppearanceOddRow = false;
     view.OptionsBehavior.Editable = this.EditMode;
 }
开发者ID:jb3622,项目名称:Serrano,代码行数:11,代码来源:SummaryWorkbenchForm.cs

示例4: ValidateCertificate

        void ValidateCertificate(GridView view, GridColumn certNameColumn, GridColumn expDateColumn, ValidateRowEventArgs e)
        {
            string certName = (string)view.GetRowCellValue(e.RowHandle, certNameColumn);
            DateTime? certExpDate = (DateTime?)view.GetRowCellValue(e.RowHandle, expDateColumn);

            view.ClearColumnErrors();

            if (string.IsNullOrWhiteSpace(certName))
            {
                view.SetColumnError(certNameColumn, Program.LanguageManager.GetString(StringResources.Settings_ValueRequired));
                e.Valid = false;
            }
        }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:13,代码来源:SettingsXtraForm.cs

示例5: RefreshGrid

        /// <summary>
        /// Refreshes and redisplays a grid 
        /// </summary>
        /// <param name="grid"></param>
        /// <param name="view"></param>
        /// <param name="level"></param>
        private void RefreshGrid(DevExpress.XtraGrid.GridControl grid, GridView view, int level)
        {
            var timeStart = System.DateTime.Now;
            this.Cursor = Cursors.WaitCursor;
            base.UpdateStatusMessage("Loading...");

            view.ClearColumnsFilter();
            view.ClearGrouping();
            view.ClearSorting();

            Application.DoEvents();

            try
            {
                grid.Visible = false;
                grid.SuspendLayout();

                view.ClearColumnErrors();
                view.OptionsView.EnableAppearanceEvenRow = false;
                view.OptionsView.EnableAppearanceOddRow = false;
                view.OptionsBehavior.Editable = this.EditMode;

                _highlights.Clear();

                grid.Visible = true;
                // SetupColumns(view, level);
                SetupMenu();
                grid.Views[0].RefreshData();
                grid.ResumeLayout();

            }
            catch (Exception ex)
            {
                ErrorDialog.Show(ex, "RefreshGrid");
            }
            this.Cursor = Cursors.Default;
            UpdateStatusMessage(string.Format("Load time {0:0.0}secs", System.DateTime.Now.Subtract(timeStart).TotalSeconds));
        }
开发者ID:jb3622,项目名称:Serrano,代码行数:44,代码来源:SummaryWorkbenchForm.cs


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