Change the right panel background when a record is found
<p>I could use a little bit of help on the following matter:</p>

<p>I have 31 panels for each day in the month.
I want to change the background of a panel whenever there is a record found (in the dataset) on that day.</p>

<p>If you take a look at the code you can see where i'm going, all panels need to be pointed out separately. This looks to long if you ask me. I think you need to make a index for all panels? </p>

<p>Is there another/better way of doing this? And if so, how?</p>

<pre><code>        int MaxRows;
        MaxRows = ds.Tables["Dataset"].Rows.Count;

        for (int i = 0; i != (MaxRows); i++)
        {
            DataRow dRow = ds.Tables["Dataset"].Rows[i];

            if (dRow.ItemArray.GetValue(1).ToString() == "1")
            {
                panDay1.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "2")
            {
                panDay2.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "3")
            {
                panDay3.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "4")
            {
                panDay4.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "5")
            {
                panDay5.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "6")
            {
                panDay6.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "7")
            {
                panDay7.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "8")
            {
                panDay8.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "9")
            {
                panDay9.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "10")
            {
                panDay10.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "11")
            {
                panDay11.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "12")
            {
                panDay12.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "13")
            {
                panDay13.BackColor = Color.LightSteelBlue;
            }
            else if (dRow.ItemArray.GetValue(1).ToString() == "14")
            {
                panDay14.BackColor = Color.LightSteelBlue;
            }
            etc. 
            etc.
            etc.
</code></pre>

<p>Can anyone please help me out?</p>
