How to bind the VIBlend DataGridView for WinForms to a SQL Table?
|
Article Information
|
Article relates to VIBlend DataGridView for WinForms
|
How To
|
Bind the data grid to the Customer table of the AdventureWorksLT Database.
|
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 new AdventureWorksLTDataSet. In order to create it, do the following: Select Data->Add New DataSource->DataBase->DataSet. Add a connection to the AdventureWorksLT Database and Click the 'Next' button. Then expand the 'Tables' tree node, select Customer and click the 'Finish' button.
Note: The AdventureWorksLT Database is installed with the installation of the SQL Server. However, you can also download and install it from
http://sqlserversamples.codeplex.com
|
|
3. Create a new instance of the AdventureWorksLTDataSet data set. Then create a new CustomerTableAdapter and fill the Customer table with data. Finally, bind the VIBlend DataGrid for WinForms to the Customer table.
|
|
|
|