title: How do you create and add data to gridview object? VB.NET
body: <p>I want to create a grid view object with two columns: EventName and Date.</p>
  
  <p>I'm working in VB and my webapp will read through a txt file to get this data that will be added to the gridview. The data in the text file will look something like this:</p>
  
  <pre><code>76ers vs Timberwolves
  2/20/2013
  
  76ers vs Heat
  2/23/2013
  
  76ers vs Knicks
  2/24/2013
  
  76ers vs Warriors
  3/2/2013
  </code></pre>
  
  <p>So that after reading through the list, my grid view should look something like this:</p>
  
  <pre><code>EVENT NAME                 DATE
  76ers vs Timberwolves      2/20/2013
  76ers vs Heat              2/23/2013
  76ers vs Knicks            2/24/2013
  76ers vs Warriors          3/2/2013
  </code></pre>
  
  <p>This is the code I used for reading the data from the text file to directly render it into a calendar object:</p>
  
  <pre><code>Sub DayRender(ByVal source As Object, ByVal e As DayRenderEventArgs) Handles Calendar1.DayRender
  
  
  Dim FILENAME As String = Server.MapPath("EventsList3.txt")
  
  
  Dim objStreamReader As StreamReader
  objStreamReader = File.OpenText(FILENAME)
  
  
  Dim contents(0 To 999) As String
  Dim month(0 To 999) As Integer
  Dim day(0 To 999) As Integer
  Dim year(0 To 999) As Integer
  
  Dim i As Integer = 0
  
  While objStreamReader.EndOfStream = False
      objStreamReader.ReadLine()
      contents(i) = objStreamReader.ReadLine
      month(i) = objStreamReader.ReadLine
      day(i) = objStreamReader.ReadLine
      year(i) = objStreamReader.ReadLine
      i = i + 1
  End While
  
  
  Dim j As Integer = 0
  
  While j &lt; 10
      If e.Day.Date.Day = day(j) And e.Day.Date.Month = month(j) And e.Day.Date.Year = year(j) Then
          e.Cell.Controls.Add(New LiteralControl(ChrW(60) &amp; "br" &amp; ChrW(62) &amp; contents(j)))
      End If
      j = j + 1
  End While
  
  objStreamReader.Close()
  
  End Sub
  </code></pre>
  
  <p>The text file I used for the code above looked like this:</p>
  
  <pre><code>76ers vs Timberwolves
  2
  20
  2013
  
  76ers vs Heat
  2
  23
  2013
  
  76ers vs Knicks
  2
  24
  2013
  
  76ers vs Warriors
  3
  2
  2013
  
  76ers vs Celtics
  4
  2
  2013
  
  76ers vs Heat
  3
  13
  2013
  
  76ers vs Hawks
  3
  6
  2013
  
  76ers vs Magic
  3
  10
  2013
  
  76ers vs Bulls
  2
  28
  2013
  
  76ers vs Raptors
  1
  18
  2013
  </code></pre>
  
  <p>Now I need to do almost the same thing, except now instead of sending the information to a calendar object, I need the information to be added into a grid view object. Does anyone know a good gridview guide that could give me an extremely easy sample to work off of? My problem is just figuring out using Microsoft's objects since I'm required to use them for my assignment. </p>
  
  <p>I'll be very grateful for a nice sample Gridview, cheers!</p>