How to bind the DataGridView to a List?
|
Article Information
|
Article relates to VIBlend DataGridView for WinForms
|
How To
|
Bind the data grid to a list.
|
Solution
|
To achieve this, follow these steps:
|
1. Create a new instance of the vDataGridView via drag and drop from the toolbox or create it programmatically.
|
2. Create a class named Customer
|
|
3. In the form's constructor after the InitializeComponent method call or in the form Load event handler use the code snippet below to create a new list and fill it with sample items:
|
|
4. Finally, in order to bind the grid to the list, use the code snippet below:
|
|
|