This article describes the method of DevExpress to obtain RepositoryItem based on row and column index. The specific method is as follows:
The main function codes are as follows:
/// <summary> /// Get the RepositoryItem based on the row and column index/// </summary> /// <param name="view">GridView</param> /// <param name="rowIndex">Row Index</param>/// <param name="columnIndex">Column Index</param>/// <returns>RepositoryItem</returns> public static RepositoryItem GetRepositoryItem(this GridView view, int rowIndex, int columnIndex) { GridViewInfo _viewInfo = () as GridViewInfo; GridDataRowInfo _viewRowInfo = _viewInfo.(rowIndex) as GridDataRowInfo; return _viewRowInfo.Cells[columnIndex].Editor; }
Hope the code described in this article will be helpful to everyone!