ukerandi
asked on
C# - Winform
Hi See below my code
Sometime this is not working, any idea where im doing mistake, What i need is ,when user click i need to get row data for example
if user click on row 2 i need column1 and column 2 data.
private void dataGridViewFranceCube_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
DataGridViewRow rowNumber = dataGridViewFranceCube.SelectedRows[0];
txtitem.Text = rowNumber.Cells[0].Value.ToString();
txtProductDescription.Text = rowNumber.Cells[2].Value.ToString();
}
Sometime this is not working, any idea where im doing mistake, What i need is ,when user click i need to get row data for example
if user click on row 2 i need column1 and column 2 data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
do you have any exception thrown ? if yes can you show it ?
do you have any exception thrown ? if yes can you show it ?
ASKER
{
MessageBox.Show("Test");
DataGridViewImageCell cell = (DataGridViewImageCell)
dataGridViewFranceCube.Row
}
and also i have add following code to Designer.cs also but still not working
this.dataGridViewFranceCub