So it seems like I'm continually doing a VSTO demo in Excel where I add a data source (Northwind usually) and show how you can drag and drop from the data sources window into an Excel spreadsheet to show a customer and the orders a customer has made. The fields about the customer (name, address, phone) are added as simple data bindings to Excel ranges and the orders a customer has made is added as a list object. Then I usually drag and drop a button onto the spreadsheet and write code like this behind the button to move to the next customer:
Well, the reason I drag and drop a button is because the cool little VCR control also known as BindingNavigator is not on the toolbox in VSTO at designtime. But you can add it at runtime and hook it up pretty simply. Here is some code that you can put in startup to use the BindingNavigator control in a VSTO Excel solution.
Dim b As New BindingNavigator(True)Me.Controls.AddControl(b, 0, 0, 1000, 5, "navigator")b.BindingSource = Me.CustomersBindingSource