Using Visual Basic PowerPack DataRepeater control in Visual Studio 2013

DataRepeater is great control to display data from a table/view, as the name says repeats bunch of fields from a dataset on every row. Follow these simple steps to get started working with this control…

Step 1:

Add a reference to the PowerPack library as shown here: http://ntcoder.com/bab/2013/12/20/visualbasic-powerpack-missing-from-visual-studio-2013/

Step 2:

Make sure you’ve got the datasets in place: Press Shift + Alt + D or View –> Other Windows –> Data Sources. See below screenshots of my Northwind dataset…

image

Step 3:

Drag and drop an instance of data repeater onto your win forms or a container control. Resultant form will look as follows…

image

Please note you’ve got to have the right version of DataRepeater in order for it to get displayed on the form designer surface.

Step 4:

Drag and drop fields from your data set onto this data repeater’s surface. Note that every field dropped on to data repeater will be a pair of control (Label followed by text field or any other control if the option is provided, in my case picture control). I’ve got the following fields dropped on to the control…

image

The size of the control at runtime will be the same as the one you’ve given on the designer, unless you’ve docked the control. Scrollbar’s will be provided by the control to scroll through the rows of data.

Step 5:

Now if I run the form this is what I see. You can scroll through as well. Quick way to display data on a form.

image

Step 6:

DataRepeater supports some other features as well, please go through the documentation to know more. Enjoy!

One thought on “Using Visual Basic PowerPack DataRepeater control in Visual Studio 2013

Appreciate your comments...