Grid View Data Fetch in to TextBoxes using windows applicati
I want to fetch the data into grid view to textboxes using in windows application .but not possible to do that things i search in so many websites but i cant find that the particular solution of my problem all solutions depending on the webapplication oriented if you have any idea tell me immediately
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Nitesh KejriwalRank #253 · 9.9K reputationPosted Sep 1, 2013, 10:30 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 1, 2013, 10:34 PM EDT
try like this:
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
//Get the selected row from user
DataGridViewRow SelectedRow = dataGridView1.Rows[e.RowIndex];
//Get the value at the cells in the Row
string Username = SelectedRow.Cells["Username"].Value.ToString();
string Password = SelectedRow.Cells["Password"].Value.ToString();
//Set the value to the text box
txtUsername.Text = Username;
txtPwd.Text = Password;
}