标签:indicator column selected 显示序号 false als idv ons font
/// <summary> /// 显示序号。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) { if (e.Info.IsRowIndicator && e.RowHandle >= 0) { e.Info.DisplayText = (e.RowHandle + 1).ToString(); } }
序号列的宽度设置gridView 的IndicatorWidth属性即可。
return gridView1.GetRowCellValue(pRows[0], ColumName).ToString ();
this.gridView1.OptionsBehavior.Editable = false;
一、GridContorl显示chekbox
设置MultiSelectMode = CheckBoxRowSelect;
MultiSelect = True;
二、获取checkBox选中行
int[] rownumber = this.gridView1.GetSelectedRows();//获取选中行号;
DataRow row = this.gridView1.GetDataRow(rownumber[0]);//根据行号获取相应行的数据;
添加一个ContextMenuStrip控件
标签:indicator column selected 显示序号 false als idv ons font
原文地址:http://www.cnblogs.com/Jian-Zhang/p/7461530.html