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


C# GridView.ClearSelection方法代码示例

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


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

示例1: SelectFocusedRow

 private void SelectFocusedRow(GridView grid, int rowHandle)
 {
     grid.BeginSelection();
       grid.ClearSelection();
       grid.FocusedRowHandle = rowHandle;
       grid.SelectRow(rowHandle);
       grid.EndSelection();
 }
开发者ID:Morphipapa,项目名称:ChanSort,代码行数:8,代码来源:MainForm.cs

示例2: LoadSelectionViewInfo

 public void LoadSelectionViewInfo(GridView view)
 {
     view.BeginSelection();
     try
     {
         view.ClearSelection();
         for (int i = 0; i < SaveSelList.Count; i++)
             SelectRowByRowInfo(view, (RowInfo)SaveSelList[i], i == SaveSelList.Count - 1);
     }
     finally
     {
         view.EndSelection();
     }
 }
开发者ID:Solnake,项目名称:kayflow,代码行数:14,代码来源:RefreshHelperClass.cs

示例3: AddXemTatCa

        private static BarButtonItem AddXemTatCa(BarManager barManager, Bar mainBar,
            BarButtonItem barButtonItemSearch, PopupControlContainer popUP,
            BarCheckItem filter, GridView gridViewMaster, string filterString,
            string ascSortClause, string descSortClause, string groupClause
            )
        {
            int index = 0;
            for (int i = 0; i < mainBar.LinksPersistInfo.Count; i++)
            {
                LinkPersistInfo info = mainBar.LinksPersistInfo[i];
                if (info.Item.Name == barButtonItemSearch.Name)
                {
                    info.BeginGroup = false;
                    index = i;
                    break;
                }
            }

            var viewAll = new BarButtonItem
                              {
                                  Caption = "Xem tất c&ả",
                                  PaintStyle = BarItemPaintStyle.CaptionGlyph,
                                  Glyph = FrameworkParams.imageStore.GetImage2020("Picture.png"),
                                  Visibility = BarItemVisibility.Always
                              };

            viewAll.Appearance.ForeColor = Color.Red;
            Font bk = viewAll.Font;
            viewAll.Appearance.Font = new Font(bk, FontStyle.Bold);
            viewAll.Appearance.Options.UseFont = true;
            viewAll.Appearance.Options.UseForeColor = true;

            mainBar.LinksPersistInfo.Insert(index, new LinkPersistInfo(viewAll, true));
            barManager.Items.Add(viewAll);

            viewAll.ItemClick += delegate
                                     {

                                         var wait = new FWWaitingMsg();

                                         try
                                         {

                                             var query = new QueryBuilder(filterString);
                                             if (!string.IsNullOrEmpty(groupClause))
                                             {
                                                 query.addGroupBy(groupClause);
                                             }
                                             if (ascSortClause != "")
                                                 query.setAscOrderBy(ascSortClause);
                                             if (descSortClause != "")
                                                 query.setDescOrderBy(descSortClause);
                                             var ds = HelpDB.getDBService().LoadDataSet(query);
                                             gridViewMaster.ClearSelection();
                                             if (ds != null && ds.Tables.Count > 0)
                                             {
                                                 gridViewMaster.GridControl.DataSource = ds.Tables[0];
                                                 if (gridViewMaster.RowCount > 0)
                                                 {
                                                     gridViewMaster.FocusedRowHandle = -1;
                                                     gridViewMaster.SelectRow(0);
                                                     gridViewMaster.FocusedRowHandle = 0;
                                                 }
                                                 else
                                                 {
                                                     gridViewMaster.SelectRow(-1);
                                                 }

                                             }
                                             else gridViewMaster.GridControl.DataSource = null;

                                             filter.Checked = false;

                                             //if (frm == null
                                             //    || !(frm is PhieuQuanLyBandedChange)
                                             //    || ((PhieuQuanLyBandedChange)frm)._UsingCheckFiler)
                                             //{
                                             //    popUP.Visible = false;
                                             //}

                                             ClearDataCtrl(popUP.Controls);
                                         }
                                         catch (Exception ex)
                                         {
                                             PLException.AddException(ex);
                                         }
                                         finally
                                         {
                                             wait.Finish();
                                         }
                                     };
            return viewAll;
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:93,代码来源:AppCtrl.cs

示例4: SetupColumns


//.........这里部分代码省略.........
                        col.Visible = true;
                        col.OptionsColumn.ShowInCustomizationForm = true;
                        col.Tag = "Show";
                    }
                    else
                    {
                        col.OptionsColumn.AllowEdit = true;
                        col.Visible = false;
                        col.OptionsColumn.ShowInCustomizationForm = true;
                        col.Tag = null;
                    }
                    col.Caption = "Pattern Id";
                    col.ColumnEdit = riPatternId;
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.PatternInheritedLevel))
                {
                    col.Visible = ShowHiddenFields;
                    col.OptionsColumn.ShowInCustomizationForm = ShowHiddenFields;
                    col.Caption = "PatternInheritedLevel";
                    col.DisplayFormat.FormatType = FormatType.Custom;
                    col.DisplayFormat.FormatString = "{0:00}";
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.PatternActualFlag))
                {
                    col.Visible = ShowHiddenFields;
                    col.OptionsColumn.ShowInCustomizationForm = ShowHiddenFields;
                    col.Caption = "PatternActualFlag";
                    col.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.PatternOverrideLevel))
                {
                    col.Visible = ShowHiddenFields;
                    col.OptionsColumn.ShowInCustomizationForm = ShowHiddenFields;
                    col.Caption = "PatternOverrideLevel";
                    col.DisplayFormat.FormatType = FormatType.Custom;
                    col.DisplayFormat.FormatString = "{0:00}";
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.PatternStatus))
                {
                    col.Visible = ShowHiddenFields;
                    col.OptionsColumn.ShowInCustomizationForm = ShowHiddenFields;
                    col.Caption = "PatternStatus";
                    col.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
                    col.Fixed = FixedStyle.Left;
                }

                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.StockRequirement))
                {
                    col.Visible = true;
                    col.Caption = "Total Stock Requirement";
                    col.DisplayFormat.FormatType = FormatType.Numeric;
                    col.DisplayFormat.FormatString = "N0";
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.IdealReplenishmentQuantity))
                {
                    col.Visible = true;
                    //                    col.Caption = "Ideal Quantity";
                    col.Caption = "Ideal Allocation";
                    col.DisplayFormat.FormatType = FormatType.Numeric;
                    col.DisplayFormat.FormatString = "N0";
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.ProposedAllocationQuantity))
                {
                    col.Visible = true;
                    col.Caption = "Proposed Allocation";
                    col.DisplayFormat.FormatType = FormatType.Numeric;
                    col.DisplayFormat.FormatString = "N0";
                    col.Fixed = FixedStyle.Left;
                }
                else if (col.FieldName == SummaryWorkbenchInfo.GetSummaryItemName(SummaryWorkbenchInfo.SummaryItemColumns.Changed))
                {
                    col.Visible = ShowHiddenFields;
                    col.OptionsColumn.ShowInCustomizationForm = ShowHiddenFields;
                    col.Caption = "Changed";
                    col.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
                    col.Fixed = FixedStyle.Left;
                }
                else
                {
                    unknownColumns.Add(col.FieldName);
                }

                if (col.OptionsColumn.AllowEdit)
                {
                    col.AppearanceCell.BackColor = this.EditMode ? Color.LightCyan : Color.White;
                }

            }

            view.ClearSelection();

            if (unknownColumns.Count > 0)
                MessageBox.Show(string.Join("\n", unknownColumns), "Unknown Columns", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
开发者ID:jb3622,项目名称:Serrano,代码行数:101,代码来源:SummaryWorkbenchForm.cs


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