Created
October 12, 2020 10:04
-
-
Save Zujaj/bb5ae76cbb6ef842871d569123d61b11 to your computer and use it in GitHub Desktop.
Form Load Event of TestApp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void TestAppForm_Load(object sender, EventArgs e) | |
{ | |
// Invoke the method PopulateList using the person object | |
// Pass the personList as the parameter. | |
personObject.PopulateList(personList); | |
// Use morelinq ToDataTable extension for converting personList to DataTable. | |
// Assign the converted Datatable to BindingSource's DataSource. | |
personBindingSource.DataSource = personList.ToDataTable(); | |
//Finally assign personBindingSource to DataGridView's DataSource. | |
dataGridView.DataSource = personBindingSource; | |
//Allow data filtering | |
EnableGridFilter(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment