时间:2020-11-22 22:13:12 | 栏目:.NET代码 | 点击:次
本文实例讲述了DevExpress实现根据行,列索引来获取RepositoryItem的方法,具体方法如下:
主要功能代码如下:
/// <summary> /// 根据行,列索引来获取RepositoryItem /// </summary> /// <param name="view">GridView</param> /// <param name="rowIndex">行索引</param> /// <param name="columnIndex">列索引</param> /// <returns>RepositoryItem</returns> 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; }
希望本文所述代码对大家有所帮助!