title: vb.net Update datatable - RowChanged
body: <p>I am trying to update a datagridview and a chart.<br>
  I have a class and in that class I have a function that returns a datatable from database.<br>
  I need the bindingSource because this is how I update chart (bar)<br>
  Unfortunately when the chart is Pie I need to use a datatable for updating<br>
  So when I load the form I have:</p>
  
  <pre><code>gbsGraph.DataSource = graphFunctions.prepareData() 'gbsGraph is a BindingSource
  gdtGraphData = graphFunctions.prepareData() 'gdtGraphData  isDataTable
  gdv.DataSource = gbsGraph 'gdv is my datagridview
  AddHandler gdtGraphData.RowChanged, AddressOf gdtGraphData_RowChanged 'add event for update piechart
  fillChart()'code to fill the chart
  </code></pre>
  
  <p>When the user press the refresh button:</p>
  
  <pre><code>Private Sub tsmiRefresh_Click(sender As System.Object, e As System.EventArgs) Handles tsmiRefresh.Click
    gbsGraph.DataSource = graphFunctions.prepareData()' this works and dgv and my bar charts are updated
    gdtGraphData = graphFunctions.prepareData()  'this is should trigger the event gdtGraphData.RowChanged but it doesn't   
  End Sub
  </code></pre>
  
  <p>My custom event for DataRowChange:</p>
  
  <pre><code>Private Sub gdtGraphData_RowChanged(ByVal sender As Object, ByVal e As DataRowChangeEventArgs)
      'Here is code to refill the Pie chart
      'but the event isn't fired
  End Sub
  </code></pre>
  
  <p>So my question is how I can update my datatable and fire the gdtGraphData_RowChanged event?</p>
  
  <p>Thanks
  T</p>