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


C# GridView.GetMasterRowExpanded方法代码示例

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


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

示例1: RefreshView

 public static void RefreshView(GridView view)
 {
     try
     {
         if (((view.GridControl != null) && !view.GridControl.Disposing) && !view.GridControl.IsDisposed)
         {
             List<int> list = new List<int>();
             for (int i = 0; i < view.RowCount; i++)
             {
                 int visibleRowHandle = view.GetVisibleRowHandle(i);
                 if ((visibleRowHandle >= 0) && !view.GetMasterRowExpanded(visibleRowHandle))
                 {
                     EventLog.WriteLine("Row {0} is collapsed", new object[] { view.GetRow(visibleRowHandle) });
                     list.Add(view.GetRow(visibleRowHandle).GetHashCode());
                 }
             }
             view.RefreshData();
             bool flag = false;
             for (int j = 0; j < list.Count; j++)
             {
                 for (int k = 0; k < view.RowCount; k++)
                 {
                     int rowHandle = view.GetVisibleRowHandle(k);
                     if (view.GetRow(rowHandle).GetHashCode() == list[j])
                     {
                         EventLog.WriteLine("Re-collapsing row {0}", new object[] { view.GetRow(rowHandle) });
                         view.CollapseMasterRow(k);
                         flag = true;
                     }
                 }
             }
             if (!view.IsFirstRow && (view.DetailLevel != 0))
             {
                 view.MoveFirst();
                 flag = true;
             }
             if (flag)
             {
                 view.Invalidate();
             }
         }
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
     }
 }
开发者ID:micheljung,项目名称:gpgnetfix,代码行数:47,代码来源:GPGGridView.cs

示例2: SaveExpandedMasterRows

 public void SaveExpandedMasterRows(GridView view)
 {
     if (view.GridControl.Views.Count == 1) return;
     SaveMasterRowsList.Clear();
     GridColumn column = view.Columns[descriptor.keyFieldName];
     for (int i = 0; i < view.DataRowCount; i++)
         if (view.GetMasterRowExpanded(i))
         {
             object key = view.GetRowCellValue(i, column);
             SaveMasterRowsList.Add(key);
             GridView detail = view.GetVisibleDetailView(i) as GridView;
             if (detail != null)
             {
                 ViewState state = ViewState.Create(this, detail);
                 if (state != null)
                 {
                     DetailViews.Add(key, state);
                     state.SaveState(detail);
                 }
             }
         }
 }
开发者ID:Solnake,项目名称:kayflow,代码行数:22,代码来源:RefreshHelperClass.cs


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