DevExpress实现根据行,列索引来获取RepositoryItem的方法

本文实例讲述了DevExpress实现根据行,列索引来获取RepositoryItem的方法,具体方法如下:

主要功能代码如下:

/// 
/// 根据行,列索引来获取RepositoryItem
/// 
/// GridView
/// 行索引
/// 列索引
/// RepositoryItem
public static RepositoryItem GetRepositoryItem(this GridView view, int rowIndex, int columnIndex)
{
  GridViewInfo _viewInfo = view.GetViewInfo() as GridViewInfo;
  GridDataRowInfo _viewRowInfo = _viewInfo.RowsInfo.FindRow(rowIndex) as GridDataRowInfo;
  return _viewRowInfo.Cells[columnIndex].Editor;
}

希望本文所述代码对大家有所帮助!

你可能感兴趣的:(DevExpress实现根据行,列索引来获取RepositoryItem的方法)