不显示删除回复显示所有回复显示星级回复显示得分回复 右键datagridview时,如何取出该行ID值(ID为主键且递增)
下面的例子是点击右键时,取出当前datagridview的实际行数值(并非ID列的值),如何取出ID列的值,求高手指点。(注:表名Products)
private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
if (e.RowIndex >= 0)
{
dataGridView1.ClearSelection();
dataGridView1.Rows[e.RowIndex].Selected = true;
dataGridView1.CurrentCell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
rightIndex = dataGridView1.CurrentCell.RowIndex;
}
}
}
希望高手帮忙,最好说详细点或给出代码 --------------------编程问答-------------------- --------------------编程问答-------------------- 我已经会了 。。 --------------------编程问答-------------------- MDI,跨窗体控制控件出错,有什么办法么
链接 - http://topic.csdn.net/u/20110603/20/37359e02-365e-4d9b-9cca-7e1129100252.html
补充:.NET技术 , C#