//修改仓库
private void EditWareHouse_Click(object sender, EventArgs e)
{
try
{
MessageBox.Show(gridView1.FocusedRowHandle.ToString()); //获取到的焦点总为负数
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
解决方案
40
dataGridView1.CurrentRow.Index;本人一般用这个获取选中行
20
大的负数值,是预定义行
// 摘要:
// The grid control.
[ComplexBindingProperties("DataSource", "DataMember")]
[DataAccessMetadata("All", SupportedProcessingModes =