关键代码:
class="csharpcode"> /// <summary> /// 根据rowIndex和visibleColumnsIndex来获取单元格可见值 /// </summary> /// <param name="view">GridView</param> /// <param name="rowIndex">rowIndex</param> /// <param name="visibleColumnsIndex">visibleColumnsIndex</param> /// <returns>单元格可见值</returns> public static string GetRowCellDisplayText(this GridView view, int rowIndex, int visibleColumnsIndex) { return view.GetRowCellDisplayText(rowIndex, view.VisibleColumns[visibleColumnsIndex]); } /// <summary> /// 根据rowIndex和visibleColumnsIndex来获取单元格值 /// </summary> /// <param name="view">GridView</param> /// <param name="rowIndex">rowIndex</param> /// <param name="visibleColumnsIndex">visibleColumnsIndex</param> /// <returns>单元格值</returns> public static object GetRowCellValue(this GridView view, int rowIndex, int visibleColumnsIndex) { return view.GetRowCellValue(rowIndex, view.VisibleColumns[visibleColumnsIndex]); }希望有所帮助!