标签:cell item ons div selection log mouse select color
1、设置选择模式
this.DataGridView_1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
2、添加CellMouseDown事件
if (e.Button == MouseButtons.Right) { if (e.RowIndex >= 0) { DataGridView_1.ClearSelection(); DataGridView_1.Rows[e.RowIndex].Selected = true; DataGridView_1.CurrentCell = dgItems.Rows[e.RowIndex].Cells[e.ColumnIndex]; } }
标签:cell item ons div selection log mouse select color
原文地址:http://www.cnblogs.com/xakml/p/7154981.html