title: Css Class not applied to last element in a repeater
body: <p>I have a Repeater to display categories (see img). This works for all elements except the last one. </p>
  
  <p><a href="https://i.stack.imgur.com/dIodY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dIodY.png" alt="enter image description here"></a></p>
  
  <p>I use <code>OnDataBound</code> method to apply classes to elements based on text value:</p>
  
  <pre><code> protected void dlPartnerCat_OnItemDataBound(object sender, RepeaterItemEventArgs e)
      {
          foreach (GridDataItem _item in gvPartnerList.Items)
          {
              var _list = _item.MuchBetterFindControl&lt;Repeater&gt;("dlPartnerCat");
  
              foreach (RepeaterItem _ite in _list.Items)
              {
                  var _partCatlbl = _ite.MuchBetterFindControl&lt;Label&gt;("lblPartCat");
  
                  if (_partCatlbl != null)
                  {
                      switch (_partCatlbl.Text)
                      {
                          case "Customer":
                              _partCatlbl.CssClass = ApplicationCssHelper.CustomerClass;
                              break;
                          case "Customer - Supplier":
                              _partCatlbl.CssClass = ApplicationCssHelper.Customer_SupplierClass;
                              break;
                          case "Supplier":
                              _partCatlbl.CssClass = ApplicationCssHelper.SupplierClass;
                              break;
                          case "Agent":
                              _partCatlbl.CssClass = ApplicationCssHelper.AgentClass;
                              break;
                          default:
                              _partCatlbl.CssClass = ApplicationCssHelper.WarningClass;
                              break;
                      }
                  }
              }
  
          }
      }
  </code></pre>
  
  <p>it does not matter which Category is last </p>