GridViewRow SelectedRow;
foreach (GridViewRow gr in GridView1.Rows)
{
if ( gr.Cells[1].ToString() == "Value1" && gr.Cells[2].ToString() == "Value2")
{
SelectedRow = gr; break;
}
}
But using LINQ we can write same thing as more readable manners as given below.
GridViewRow SelectedRow = GridView1.Rows.OfType
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
No comments:
Post a Comment