Public Class frmCities

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'MegacitiesDataSet.Cities' table. You can move, or remove it, as needed.
    Me.CitiesTableAdapter.Fill(Me.MegacitiesDataSet.Cities)
  End Sub

  Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
    Dim query = From city In MegacitiesDataSet.Cities
                Let popIncrease = city.pop2015 - city.pop2010
                Let formattedIncr = FormatNumber(popIncrease, 1)
                Where (popIncrease > 1)
                Order By popIncrease Descending
                Select city.name, formattedIncr
    dgvOutput.DataSource = query.ToList
    dgvOutput.CurrentCell = Nothing
    dgvOutput.Columns("name").HeaderText = "City"
    dgvOutput.Columns("formattedIncr").HeaderText = "Population Increase"
  End Sub

End Class
