title: Need some advice on putting data into DataGridView in vb.Net
body: <p>I need a little advice in manipulating DataGridView in Visual Basic .Net. This is my first time playing with DataGridView. My program is to load a .txt file containing data of every room in a building and display them in the DataGridView. </p>
  
  <p>Here is a portion of the file showing 2 rooms:</p>
  
  <pre><code>1;1812;1812;F18;T1;26808.16;.00;.00;.00;.00;.00;.00;
  1;1813;1813;F18;T1;24000.00;3500.00;.00;300.00;.00;.00;.00
  </code></pre>
  
  <p>A room is a one-line string that ends with an endline character.</p>
  
  <p>I have no problem with loading the file and getting all these information. I store data of each room into an object of class Room, and put them in a list.</p>
  
  <p>Right now, I put all of the properties of the room into the data grid's columns like this:
  <img src="https://i.stack.imgur.com/uqakf.jpg" alt="edit columns"></p>
  
  <p>Now, how can I put all these rooms' data into the grid? I tried follow <a href="http://www.dotnetperls.com/datagridview-vbnet" rel="nofollow noreferrer">http://www.dotnetperls.com/datagridview-vbnet</a> at first, but setting DataSource to a list of class Room imitating from the given link doesn't show anything in the grid view. How can we tell the program to link rows of the grid to a list of objects? Or am I doing it wrong?</p>
  
  <p>So any advise is appreciated. How do we do this?</p>