title: How i can update my second combobox when "SelectedItem" is changed
body: <p>I've two comboboxes in a form, the first combobox display each "mark" of truck and second may display the models of each "mark". For example if mark is volvo the second combobox may display "FH, FH6 ...", otherwise if mark is "MAN" the second combobox may display "TGX, TGX 38" ... </p>
  
  <p>I've try to do a cycle to refesh my second combobox, each time, that the first combobox is changed.</p>
  
  <pre><code>  while (comboBox1.SelectedIndex == -1)
              {
                  comboBox2.Items.Clear();
                  if (comboBox1.SelectedIndex == 1)
                  {
  
  
                      comboBox2.DisplayMember = "Modelo";
                      comboBox2.DataSource = d.Tables["Modelos-MAN"].DefaultView;
  
  
                  }
                  if (comboBox1.SelectedIndex == 2)
                  {
  
                      comboBox2.DisplayMember = "ModeloV";
                      comboBox2.DataSource = d.Tables["Modelos-VOLVO"].DefaultView;
                      comboBox2.Refresh();
                  }
              }
  
              if (comboBox1.SelectedIndex==1)
              {
  
  
                  comboBox2.DisplayMember = "Modelo";
                  comboBox2.DataSource = d.Tables["Modelos-MAN"].DefaultView;
  
  
              }
              if(comboBox1.SelectedIndex == 2)
              {
  
                  comboBox2.DisplayMember = "ModeloV";
                  comboBox2.DataSource = d.Tables["Modelos-VOLVO"].DefaultView;
                  comboBox2.Refresh();
              }
  </code></pre>
  
  <p>Happens that if i select "MAN", it shows "MAN" models and then if i change, and select "Volvo", the second combobox show me "System.Data.DataRowView". </p>
  
  <p>What is happening?How i can solve this?</p>
  
  <p>Note: I've also, a method to generate truck "mark" and "models":</p>
  
  <pre><code>  public DataSet LoadMarkAndModel()
          {
  
  
              var marcas = new string[6];
              marcas[0] = "Marca ...";
              marcas[1] = "MAN";
              marcas[2] = "Volvo";//Linha 2 coluna 2
              marcas[3] = "DAF";
              marcas[4] = "Renault";//Linha 4 coluna 2
              marcas[5] = "Mercedes-Benz";
              var modelosMAN = new string[7];
              var modelosVolvo = new string[5];
  
              modelosMAN[0] = "TGX";
              modelosMAN[1] = "TGX D38";
              modelosMAN[2] = "TGX EfficientLine 2";
              modelosMAN[3] = "TGS";
              modelosMAN[4] = "TGA";
              modelosMAN[5] = "TGA-WW";
              modelosMAN[6] = "TGM";
  
  
              modelosVolvo[0] = "FH16";
              modelosVolvo[1] = "FH";
              modelosVolvo[2] = "FM";
              modelosVolvo[3] = "FE";
              modelosVolvo[4] = "FL";
  
  
              DataSet data = new DataSet("DataSetOfTrucks");
              DataTable table = new DataTable("Marcas");
              DataColumn colunaID = new DataColumn("ID", typeof(int));
              DataColumn colunaMarca = new DataColumn("Marca", typeof(string));
              //table.Columns.Add("Description", typeof(string));
              table.Columns.Add(colunaID);
              table.Columns.Add(colunaMarca);
  
  
  
              for (int i = 0; i &lt; marcas.Length; i++)
              {
  
                  DataRow manyMark = table.NewRow();
                  manyMark["ID"] = i + 1;
                  manyMark["Marca"] = marcas[i];
                  table.Rows.Add(manyMark);
  
  
              }
              data.Tables.Add(table);
  
  
              DataTable modelsTable = new DataTable("Modelos-MAN");
              DataColumn modelsIDParent = new DataColumn("IDP", typeof(int));
              DataColumn modelo = new DataColumn("Modelo", typeof(string));
              modelsTable.Columns.Add(modelsIDParent);
              modelsTable.Columns.Add(modelo);
  
              int m = 0;
  
  
              while (m&lt;modelosMAN.Length)
              {
                  DataRow manyModelsMAN = modelsTable.NewRow();
                  manyModelsMAN["IDP"] = 1;
                  manyModelsMAN["Modelo"] = modelosMAN[m];
                  modelsTable.Rows.Add(manyModelsMAN);
                  m++;
                  //if (m &gt; modelosMAN.Length)
                  //    break;
  
              }
              data.Tables.Add(modelsTable);
  
  
  
              ////vOLVO
              DataTable modelsTableVOLVO = new DataTable("Modelos-VOLVO");
              DataColumn modelsIDParentVOLVO = new DataColumn("IDPVolvo", typeof(int));
              DataColumn modeloVolvo = new DataColumn("ModeloV", typeof(string));
  
              modelsTableVOLVO.Columns.Add(modelsIDParentVOLVO);
              modelsTableVOLVO.Columns.Add(modeloVolvo);
  
              int count = 0;
  
              while (count &lt; modelosVolvo.Length)
              {
                  DataRow manyModelsVolvo = modelsTableVOLVO.NewRow();
                  manyModelsVolvo["IDPVolvo"] = 2;
                  manyModelsVolvo["ModeloV"] = modelosVolvo[count];
                  modelsTableVOLVO.Rows.Add(manyModelsVolvo);
                  count++;
  
  
              }
              data.Tables.Add(modelsTableVOLVO);
  
  
              return data;
          }
  </code></pre>