```
      DataGridView dgv=new DataGridView();
      for(int i=0;i<ivc.Columns.Count-2;i++)
      {
        //MessageBox.Show((ivc.Columns.Count-1).ToString()+"  "+i.ToString());
        dgv.Columns[i].Name=("col"+i).ToString();
      }

```

The value of ivc.Columns.Count is 13.

The error is:Index extened! The index must less than 0,and less than set.Why?The dgv may have no limit index.

My purpose is:
 1.Make the code more simple! 
 2.Init a new DataGridView to store other DataGridView data to global DataGridView.

PS:The primary code is like this:

```
           DataGridView dgv=new DataGridView();          
           dgv.Rows.Clear();
          //dgv.ColumnCount=8;      
          //dgv.Columns[0].Name="col1";
          //dgv.Columns[1].Name="col2";
          //dgv.Columns[2].Name="col3";
          //dgv.Columns[3].Name="col4";
          //dgv.Columns[4].Name="col5";
          //dgv.Columns[5].Name="col6";
          //dgv.Columns[6].Name="col7";
          //dgv.Columns[7].Name="col8";

```