Sir,
I am in a asp.net mini project. here the screenshot:-
My issue is with gridview row selection. I need to fetch data from gridview into textbox when click on edit link button.
Here the c# code to fetch the data:-
I put Row[1] because of do not know how to get the id from selected row. I need your help in this issue.
As per this code,getting the data from gridview second row. How can i find the row id of selected Row

Shashank Patil169 reputationPosted Sep 8, 2015, 12:40 AM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted Sep 8, 2015, 12:42 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 8, 2015, 12:57 AM EDT
Bineesh ViswanathRank #1,681 · 907 reputationPosted Sep 8, 2015, 1:18 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 8, 2015, 1:21 AM EDT
Shashank Patil169 reputationPosted Sep 8, 2015, 1:26 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 8, 2015, 1:53 AM EDT
Bineesh ViswanathRank #1,681 · 907 reputationPosted Sep 8, 2015, 2:18 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 8, 2015, 2:35 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 8, 2015, 2:38 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 8, 2015, 3:26 AM EDT
Bineesh ViswanathRank #1,681 · 907 reputationPosted Sep 10, 2015, 9:46 PM EDT
{
string busId;
if (e.CommandName == "Edit")
{
busId = e.CommandArgument.ToString();
decimal decBusId=decimal.Parse(busId.ToString());
FetchGridDataIntoTextBox(decBusId);
btnSave.Text = "Update";
}
}
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 10, 2015, 9:49 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 10, 2015, 9:50 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 10, 2015, 9:52 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Sep 10, 2015, 11:14 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts