标签:style color width os cti for
关键代码:
/// <summary> /// 根据列来选中一行 /// </summary> /// <param name="gridView">GridView</param> /// <param name="colName">列名称</param> /// <param name="colValue">列值</param> public static void SelectRow(this GridView gridView, string colName, object colValue) { gridView.ClearSelection(); for (int rowHandle = 0; rowHandle < gridView.RowCount; rowHandle++) { object _cellValue = gridView.GetRowCellValue(rowHandle, colName); if (_cellValue != null) { if (_cellValue == colValue) { gridView.SelectRow(rowHandle); break; } } } }
代码示例:
gcLampConfig.UIThread<GridControl>(gc => gvLampConfig.SelectRow(gcKeyFieldName, _finded.LampID));
[DevExpress]GridControl根据列来选中一行,布布扣,bubuko.com
[DevExpress]GridControl根据列来选中一行
标签:style color width os cti for
原文地址:http://www.cnblogs.com/Yan-Zhiwei/p/3830128.html