How to Get the Value of a Selected Cell on DataGrid(Windows application) using c#.net

Syedshakeer
Posted by Syedshakeer under C# category on | Views : 8143
Double Click on your DataGride and write below code

dataGridView1.CurrentCell.Value.ToString();


private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
textBox1 .Text = dataGridView1.CurrentCell.Value.ToString();

}

Comments or Responses

Posted by: Cs1401 on: 7/16/2011 Level:Starter | Status: [Member] | Points: 10
really appreciated one. Thanks.

Login to post response