title: InvalidArgument=Value of'3' is not valid for 'index'. parameter name: index
body: <p>I have this error in my code: 
  InvalidArgument=Value of'3' is not valid for 'index'. parameter name: index ,
   when i want to fill just part of row of my listview !
  this is my code:</p>
  
  <pre><code> MySqlCommand cmd = new MySqlCommand("select acc_Id,acc_Name,acc_Place from accounts where archived=0 and  cus_Sup=" + 0 , objConn);
                      MySqlDataReader dataReader = cmd.ExecuteReader();
                      int i = 0;
                      while (dataReader.Read())
                      {
                          if (i % 2 == 0)
                              listView2.Items.Add(dataReader.GetValue(0).ToString()).BackColor = Color.Lavender;
                          else
                              listView2.Items.Add(dataReader.GetValue(0).ToString());
  
                          listView2.Items[i].SubItems.Add(dataReader.GetString(1).ToString());
  
                          listView2.Items[i].SubItems.Add((dataReader.IsDBNull(2) ? "No place added" : dataReader.GetString(2)));
                          //------------------------------------I meant here !
                          listView2.Items[i].SubItems.Add("0");
                          listView2.Items[i].SubItems.Add("0");
                          listView2.Items[i].SubItems.Add("0");
  
                      }
                      dataReader.Close();
  
  
                      //-------------load bills
                      for (int x = 0; x &lt; listView2.Items.Count; x++)
                      {
                          cmd = new MySqlCommand("select c.acc_Id,a.bill_Number,a.bill_Date,c.acc_Name,Sum( (b.de_Quantity * b.de_Price) - ((b.de_Quantity * b.de_Price)*b.de_DisRate/100) ),a.bill_TaxRate,a.bill_DisRate,a.bill_Note,c.acc_Place from (accounts c right JOIN bills a on c.acc_Id = a.bill_From) LEFT JOIN  bill_Details b on a.bill_Id = b.bill_Id where c.acc_Id = " + listView2.Items[x].SubItems[0].Text + " group by a.bill_Id,a.bill_Number,a.bill_Date,c.acc_Name,a.bill_TaxRate,a.bill_DisRate,a.bill_Note,c.acc_Place ", objConn);
                          dataReader = cmd.ExecuteReader();
  
                          decimal totalSum = 0, summBills = 0;
                          i = 0;
                          while (dataReader.Read())
                          {
  
                              totalSum = decimal.Parse(dataReader.IsDBNull(4) ? "0" : dataReader.GetDecimal(4).ToString("n2"));
                              totalSum -= (totalSum * decimal.Parse(dataReader.IsDBNull(6) ? "0" : dataReader.GetDecimal(6).ToString("n2")) / 100);
                              totalSum += (totalSum * decimal.Parse(dataReader.IsDBNull(5) ? "0" : dataReader.GetDecimal(5).ToString("n2")) / 100);
                              summBills += totalSum;
                              i++;
                          }
                          //MessageBox.Show(dataReader.GetValue(0).ToString()+"   "+summBills.ToString());
                          listView2.Items[x].SubItems[3].Text = summBills.ToString("n2");// the error here !
  
                          dataReader.Close();
  
                      }
  </code></pre>
  
  <p>it's print the value of first record just ! , when it move to the second the error appear !</p>