Blogs

The One With

XtraVerticalGrid – Data Binding (Transcript)

     

http://tv.devexpress.com/XtraVerticalGrid01.movie

Download Transcript: PDF Word XPS

Transcript

In this lesson, I’m going to show you how to bind XtraVerticalGrid to an Access Database.

1. First, let’s drop an XtraVerticalGrid Control onto a form, and make it fill the form.

  

2. Now we need to create a data source and bind it to the VerticalGrid. Both actions can be done by the grid’s smart tag.

3. I click the “Add Project Data Source” link to start the data source configuration wizard.

4. I choose the data source type, which is “Database” in our case.

5. Then I proceed to the next page to choose the data connection.

6. You can create a new connection here. All you have to do is locate the desired database file on the disk.

7. I’ll use an existing connection.

8. In the last step, I’ll select the “Employees” data table which will supply data to our VerticalGrid.

9. And I’m done with the data source configuration.

10. The XtraVerticalGrid Control allows rows to be arranged into a tree.

11. To customize the row layout, I run the designer.

 

12. So, I’m going to logically divide all rows into two groups.

13. The first group will contain the main information on employees, their first and last names, title, birth and hire dates.

14. I create a “Category Row” and change its caption to “Employee”.

15. Now, I’ll drag the desired rows onto it.

16. The second group will contain address information.

17. I add the second “Category Row”, let it be “Address”…

18. …and drag the rows onto it.

19. Since I don’t need to display the other rows, I delete them.

20. I close the designer, and run the application to see the result.

21. A VerticalGrid Control is filled with data from the bound data table.

Published Sep 30 2008, 08:22 PM by Azret Botash (DevExpress)
Bookmark and Share

Comments

No Comments
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.