DevExpress GridControl实现根据RowIndex和VisibleColumnsIndex来获取单元格值
程序员文章站
2023-12-18 11:02:58
本文实例展示了devexpress gridcontrol实现根据rowindex和visiblecolumnsindex来获取单元格值的方法,具体如下所示:
主要功能代...
本文实例展示了devexpress gridcontrol实现根据rowindex和visiblecolumnsindex来获取单元格值的方法,具体如下所示:
主要功能代码如下:
/// <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]); }
希望本文所述代码对大家有所帮助!