title: how to map data from a data dictionary to datagridview?
body: <p>I have a data dictionary which is as follows:</p>
  
  <pre><code>Key  Value
  
  1    ron k polito
  2    Ryan s Winslate    
  </code></pre>
  
  <p>I am trying to display the Value column in a datagridview with three different columns firstname, midname and lastname. The below statement names.getnames().ToList() retrieves the names (value) from the data dictionary.</p>
  
  <pre><code>datagridview1.DataSource = names.getnames().ToList();
  </code></pre>
  
  <p>By moving the list into datagridview creates exactly same number of rows as total number of count retrieved by the data dictionary, but it doesnot display the anything. just the blank rows appear.</p>
  
  <p>I am new to C#, any suggestion how can I fix this.</p>
  
  <p>Thanks. </p>
  
  <p>Here's the code:</p>
  
  <pre><code>             List&lt;localname&gt; lname_list = new List&lt;localname&gt;();
               var l_names = names.getnames().ToList();
               foreach(var lcname in l_names)
               {
                   string[] wrd = lcname.Split(' ');
                   localname lv = new localname();
                   lv.mylocal(wrd[0], wrd[1], wrd[2]);
                   lname_list.Add(lv);
               }
               datagridview1.DataSource = lname_list;
               ShowDialog();
  </code></pre>