foreach GridViewRow not seeing first row in dataset.

Joined
Sep 13, 2007
Messages
1
Reaction score
0
foreach GridViewRow not seeing first row in dataset.
--------------------------------------------------------------------------------

Hi, I’m new to C# and .NET, but here is my dilemma,

In a nutshell my foreach loop is not seeing / addressing the first row of my dataset.

foreach (GridViewRow row in gvt.Rows)
{
e.Row.BackColor = Color.Red;
}

This turns all rows in my Gridview to Red except the first one. I’m assuming foreach starts at [0] and the Gridview dataset starts at [1], but I’m at a loss as to how to correct it.

I’m loading the gridview using a SQL statement from an Oracle database.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top