怎样右击DataGridView行时,选中这行的数据啊? 怎样右击DataGridView行时,选中这行的数据啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void dataGridView1_CellMouseUp(object sender, System.Windows.Forms.DataGridViewCellMouseEventArgs e) { if (e.Button != MouseButtons.Right || e.RowIndex < 0) return; if (this.dataGridView1.SelectedRows.Count > 0) { for (int i = 0; i < this.dataGridView1.SelectedRows.Count; i++) this.dataGridView1.SelectedRows[i].Selected = false; } this.dataGridView1.Rows[e.RowIndex].Selected = true; } VS2005 TFS团队资源管理器无法登录——TF31003 监视局部变量的窗口不见了~ OdbcDataReader 问题 》》》》》求解答 关于word操作里的SaveAs 关于托管堆的小问题 关于C#的资源文件的问题,散100分!!! WindowsMediaPlayer全屏问题 有一个小问!需要大家帮忙! 请问各位大虾:C#中下面这段代码有什么问题,为什么数据不能出来啊 SQLITE 数据库 如何存取 byte[] 数据??? datagridview如何设置列 最近一直在研究分页存储过程的问题,100分求个经典的分页存储过程、
{
if (e.Button != MouseButtons.Right || e.RowIndex < 0)
return; if (this.dataGridView1.SelectedRows.Count > 0)
{
for (int i = 0; i < this.dataGridView1.SelectedRows.Count; i++)
this.dataGridView1.SelectedRows[i].Selected = false;
} this.dataGridView1.Rows[e.RowIndex].Selected = true;
}