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


C# DevExpress.GetSelectedRows方法代码示例

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


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

示例1: DeleteSelectedRows

        public void DeleteSelectedRows(DevExpress.XtraGrid.Views.Grid.GridView view)
        {
            if (view == null || view.SelectedRowsCount == 0) return;

            DataRow[] rows = new DataRow[view.SelectedRowsCount];

            for (int i = 0; i < view.SelectedRowsCount; i++)
                rows[i] = view.GetDataRow(view.GetSelectedRows()[i]);

            view.BeginSort();

            try
            {
                foreach (DataRow row in rows)
                    row.Delete();
            }
            finally
            {
                view.EndSort();
            }
        }
开发者ID:tofupl,项目名称:Csharp,代码行数:21,代码来源:ws.cs

示例2: RemoverRenglonDelGrid

        private void RemoverRenglonDelGrid(DevExpress.XtraGrid.GridControl Grid, DevExpress.XtraGrid.Views.Grid.GridView GV)
        {
            var lstDoctosPV = (List<DoctosPV>)(Grid.DataSource);

            if (lstDoctosPV.Count > 0)
            {
                int i = GV.GetSelectedRows()[0];
                DoctosPV retiro = (DoctosPV)GV.GetRow(i);

                lstDoctosPV.Remove(retiro);

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

示例3: RemoverRenglonDelGrid

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

            if (lstRegistros.Count > 0)
            {
                int i = GV.GetSelectedRows()[0];
                ChequeTransferencia registro = (ChequeTransferencia)GV.GetRow(i);

                lstRegistros.Remove(registro);

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

示例4: deleteSelectedRows

 public static bool deleteSelectedRows(DevExpress.XtraGrid.Views.Grid.GridView xgv)
 {
     if (xgv == null)
         return false;
     int[] nSelectedRows = xgv.GetSelectedRows();
     if (nSelectedRows.Length == 0)
         return false;
     try
     {
         DataRow drRow = null;
         foreach(int nRowHandle in nSelectedRows)
         {
             drRow = xgv.GetDataRow(nRowHandle);
             if (drRow != null)
                 drRow.Delete();
         }
     }
     catch(Exception ex)
     {
         throw(ex);
     }
     return true;
 }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:23,代码来源:Definition.cs

示例5: GetSelectedObjects

 IList GetSelectedObjects(DevExpress.XtraGrid.Views.Base.ColumnView focusedView) {
     int[] selectedRows = focusedView.GetSelectedRows();
     if ((selectedRows != null) && (selectedRows.Length > 0)) {
         IEnumerable<object> objects = selectedRows.Where(rowHandle => rowHandle > -1).Select(focusedView.GetRow).Where(obj => obj != null);
         return objects.ToList();
     }
     return new List<object>();
 }
开发者ID:derjabkin,项目名称:eXpand,代码行数:8,代码来源:XpandGridListEditor.cs

示例6: GetSelectedValues

 public object[] GetSelectedValues(DevExpress.XtraGrid.Views.Grid.GridView view, string fieldName)
 {
     int[] selectedRows = view.GetSelectedRows();
     object[] result = new object[selectedRows.Length];
     for (int i = 0; i < selectedRows.Length; i++)
     {
         int rowHandle = selectedRows[i];
         if (!gvMain.IsGroupRow(rowHandle))
         {
             result[i] = view.GetRowCellValue(rowHandle, fieldName);
         }
         else
             result[i] = -1;
     }
     return result;
 }
开发者ID:tofupl,项目名称:Csharp,代码行数:16,代码来源:ws.cs


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