CellMouseDown事件中
if (e.Button != MouseButtons.Right || e.RowIndex < 0)
return;
dataGridView1.Rows[e.RowIndex].Selected = true;
if (e.Button != MouseButtons.Right || e.RowIndex < 0)
return;
dataGridView1.Rows[e.RowIndex].Selected = true;
解决方案 »
- 高分求助。
- 让用户newwork service具有了所有的用户权限会有什么安全隐患吗?
- sokect,端口被占用,什么关闭?
- C#实现下载附件功能,附件中有网页的静态代码
- 在ASP.net中,创建项目时出现Http/1.1 500 Internal server Error错误!如何修改?
- 求助啊!还是关于datagrid的update的用法
- 请问.resx文件的作用?
- C#怎么取得音乐文件的音波?
- 关闭一个窗体后再打开就会错误,如何解决?
- 请问怎么实现文件的远程传输呀?
- (高手请进)listviewitem 屏幕的绝对位置 不是相对listview的相对位置
- textbox KeyPress只能输入数字(包括“-”,“.”)问题
否则可以使用dataGridView.Rows.Insert
newTable.Rows.Add(newTable.NewRow());//newTable为DataGridView中添加的自定义表
[email protected]
this.dataTable.Rows.InsertAt(dataRow, index);
DataRow row = this.dataTable.NewRow();
this.dataTable.Rows.InsertAt(row, index+1);