이 DataGridView가 있으며 파일을 클릭 할 때마다 ... openFileDialog를 열 때마다 나타납니다. 지금까지 체결했지만 작동하지 않습니다OpenFileDialog가 표시되지 않습니다.
.
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
string bbb = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
if (bbb == "Browse From File...")
{
openFileDialog2.ShowDialog();
}
이 아무것도뿐만 아니라 시도 :
if (e.ColumnIndex.Equals = "Browse From File...")
if (dataGridView1.SelectedCells = "Browse From File...")
if ((string)dataGridView1.SelectedCells[0].Value == "Browse From File...")
if (dataGridView1.Rows[1].Cells["Browse From File..."].Value.ToString() == "Browse From File...")
{
//openFileDialog2.ShowDialog();
}
이벤트가 발생하면 디버그를 시도 했습니까? –
첫 번째 예제에서 디버그 할 때 bbb는 무엇이 동일합니까? 점점 ((DataGridViewCell) 보낸 사람) 시도 했습니까? 값? – Timbo
디버그하고 다음 줄에 bbbin의 값을 알려주십시오. if (bbb == "Browse From File ...") –