The error i am getting for the below code is:
Cannot implicitly convert System.Web.UI.WebControls.GridViewRow to System.Web.UI.WebControls.GridView
The code is as below:
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
GridView row = GridView1.SelectedRow;
strv1 = row.Cells[1].Text;
}
Am i missing out any namespace... PLZZZ HELP
Loading

Suthish NairPosted Jan 28, 2011, 4:35 AM
I remember i already replied your same post couple of days ago.
On SelectedIndexChanged you cannot call this property. Change your code like below.
B M SuchitraPosted Jan 28, 2011, 10:03 PM
Thanks Sam and Suthish:)
Sam HobbsPosted Jan 28, 2011, 1:11 PM
Suthish NairPosted Jan 28, 2011, 11:45 AM
B M SuchitraPosted Jan 28, 2011, 7:04 AM
But i want to know why my code is wrong...If u can explain plzzz
Krishna GaradPosted Jan 28, 2011, 4:26 AM
Dataset ds=method.Dataset();
same as GridViewRow row= GridView1.SelectedRow;
Sam HobbsPosted Jan 28, 2011, 3:56 AM