title: Adding Events to Dynamically created GridView controls in VB.NET
body: <p>What I want is do add events to my dynamically created GridView controls in VB.NET.  Here is my code.</p>
  
  <pre><code>Dim dgData as New GridView()
  dgData.RowDataBound += New GridViewRowEvendHandler(dgData_RowDataBound)
  </code></pre>
  
  <p>Every time I right the code above I get the blue squiggle line under dgData.RowDataBound and here is the reason:</p>
  
  <p><code>"Public Event RowDataBound(etc...)</code>is an event, and cannot be called directly.  Use a <code>'RaiseEvent'</code> statement to raise an event"</p>
  
  <p>How can I get rid of the blue squiggle line so I can add my new event handler to this RowDataBound?</p>