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


C# GridView.GetRow方法代码示例

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


在下文中一共展示了GridView.GetRow方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: FocuseRow

 /// <summary>
 /// ���ñ��Ľ����е�ָ���Ķ�����
 /// </summary>
 /// <param name="gridView">����GridView</param>
 /// <param name="row">ָ���Ķ���</param>
 public static void FocuseRow(GridView gridView, object row)
 {
     int count = gridView.RowCount;
     for (int i = 0; i < count; i++)
     {
         object obj = gridView.GetRow(i);
         if (obj == row)
         {
             gridView.FocusedRowHandle = i;
             break;
         }
     }
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:18,代码来源:GridHelper.cs

示例3: CheckGridExpand

 private void CheckGridExpand(GridView gridView)
 {
     if (this.IsCheckingExpand)
     {
         try
         {
             for (int i = 0; i < gridView.RowCount; i++)
             {
                 if (gridView.GetRow(i) != null)
                 {
                     gridView.ExpandMasterRow(i);
                 }
             }
         }
         catch (Exception exception)
         {
             ErrorLog.WriteLine(exception);
         }
     }
 }
开发者ID:micheljung,项目名称:gpgnetfix,代码行数:20,代码来源:GPGDataGrid.cs

示例4: ExpandAllRows

 public void ExpandAllRows(GridView View)
 {
     View.BeginUpdate();
     try
     {
         int dataRowCount = View.DataRowCount;
         for (int rHandle = 0; rHandle < dataRowCount; rHandle++)
         {
             var data = (OrderlineModel)View.GetRow(rHandle);
             if (data.ChildList != null && data.ChildList.Count > 0)
                 View.SetMasterRowExpanded(rHandle, true);
             else
                 View.SetMasterRowExpanded(rHandle, false);
         }
     }
     finally
     {
         View.EndUpdate();
     }
 }
开发者ID:locdht,项目名称:MyVinaGerman,代码行数:20,代码来源:frmPurchaseOrderDetail.cs

示例5: GetSelectedRow

 private Puerto GetSelectedRow(GridView view)
 {
     return (Puerto)view.GetRow(view.FocusedRowHandle);
 }
开发者ID:TarekMulla,项目名称:cra,代码行数:4,代码来源:frmPuertos.cs

示例6: SelectRow

 void SelectRow(GridView currentView, int rowHandle, bool select, bool invalidate)
 {
     if (IsRowSelected(currentView, rowHandle) == select) return;
     object row = currentView.GetRow(rowHandle);
     if (select)
         selection.Add(row);
     else
         selection.Remove(row);
     if (invalidate)
         Invalidate(currentView);
     OnSelectionChanged();
 }
开发者ID:toanvv8x,项目名称:AccApp,代码行数:12,代码来源:GridCheckMarksSelection.cs

示例7: DoRowDoubleClick

 private PipeTestResult DoRowDoubleClick(GridView view, Point pt)
 {
     PipeTestResult row = null;
     GridHitInfo info = view.CalcHitInfo(pt);
     if(info.InRow || info.InRowCell)
     {
         row = (PipeTestResult)view.GetRow(info.RowHandle);
     }
     return row;
 }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:10,代码来源:MillPipeNewEditXtraForm.cs

示例8: GetSelectedRow

 private Agente GetSelectedRow(GridView view)
 {
     return (Agente)view.GetRow(view.FocusedRowHandle);
 }
开发者ID:TarekMulla,项目名称:cra,代码行数:4,代码来源:frmAgentes.cs

示例9: GetSelectedRow

 private CotizacionDirecta GetSelectedRow(GridView view)
 {
     return (CotizacionDirecta)view.GetRow(view.FocusedRowHandle);
 }
开发者ID:TarekMulla,项目名称:cra,代码行数:4,代码来源:FrmGestionCotizaciones.cs

示例10: GetEntityByRowHandle

 private object GetEntityByRowHandle(int rowHandle, GridView gridview)
 {
     if (gridview.IsDataRow(rowHandle))
         return gridview.GetRow(rowHandle);
     else
         return null;
 }
开发者ID:5509850,项目名称:baumax,代码行数:7,代码来源:UCGetValueFromStore.cs

示例11: IsRowSelected

        public bool IsRowSelected(GridView currentView, int rowHandle)
        {
            if (currentView.IsGroupRow(rowHandle))
                return IsGroupRowSelected(currentView, rowHandle);

            object row = currentView.GetRow(rowHandle);
            return GetSelectedIndex(row) != -1;
        }
开发者ID:toanvv8x,项目名称:AccApp,代码行数:8,代码来源:GridCheckMarksSelection.cs

示例12: GetSelectedChannels

 private List<ChannelInfo> GetSelectedChannels(GridView gview)
 {
     var channels = new List<ChannelInfo>();
       foreach (int rowHandle in gview.GetSelectedRows())
       {
     if (gview.IsDataRow(rowHandle))
       channels.Add((ChannelInfo)gview.GetRow(rowHandle));
       }
       return channels;
 }
开发者ID:Morphipapa,项目名称:ChanSort,代码行数:10,代码来源:MainForm.cs

示例13: GetChildDataRowHandles

 public static void GetChildDataRowHandles(GridView view, int rowHandle, List<Message> list)
 {
     for(int i = 0; i < view.GetChildRowCount(rowHandle); i++) {
         int row = view.GetChildRowHandle(rowHandle, i);
         if(row >= 0)
             list.Add(view.GetRow(row) as Message);
         else
             GetChildDataRowHandles(view, row, list);
     }
 }
开发者ID:rexad,项目名称:media-plan,代码行数:10,代码来源:Helpers.cs


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