求教:2个窗体之间的DataGridView操作
private void dgvRequisitionList_CellEndEdit(object sender, DataGridViewCellEventArgs e){
ProductMan productMan = new ProductMan();
if (e.ColumnIndex == 0)
{
productMan.Show();
for (int i = 0; i < productMan.dgvProduct.Rows.Count; i++)
{
productMan.dgvProduct.Rows[i].DataGridView.ForeColor = Color.Black;
productMan.dgvProduct.Rows[i].DataGridView.BackgroundColor = Color.White;
}
for (int i = 0; i < productMan.dgvProduct.Rows.Count; i++)
{
if (dgvRequisitionList.CurrentRow.Cells[0].Value == productMan.dgvProduct.Rows[i].Cells[0].Value)
{
productMan.dgvProduct.Rows[i].Selected = true;
productMan.dgvProduct.Rows[i].DataGridView.ForeColor = Color.White;
productMan.dgvProduct.Rows[i].DataGridView.BackgroundColor = Color.Blue;
}
}
}
}
应该怎么写才能让这两个for起作用呢 --------------------编程问答-------------------- e.ColumnIndex == 0用来起什么作用? --------------------编程问答-------------------- js里面 window.open("ProductMan.aspx?id=xxxx");
然后 在 ProductMan 页面里面 根据Id去操作 --------------------编程问答-------------------- 发生此事件的单元格
补充:.NET技术 , C#