Feb 032014
 
Please Share...

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!

Please Share...
Dec 202013
 
Please Share...

Where’s the Visual Studio 2013 Visual Basic PowerPack?

Note the VisualBasic PowerPack is not part of Visual Studio 2013 install, it comes as separate MSI. The download link for Visual Basic Powerpack for Visual Studio 2013 is hard to find online as well. I found the link from our internal support article.

Download VB Powerpack (direct link to bits): http://go.microsoft.com/fwlink/?LinkId=321343

Steps to Install Visual Studio 2013 Visual Basic PowerPack

Installing Visual Basic Powerpacks

Installing Visual Basic Powerpacks

Please close any open instances of Visual Studio 2013. Once the installation completes and if you still don’t see the Powerpack controls in the toolbox. Do the following.

  1. Open Visual Studio 2013
  2. Open the toolbox. Add a new tab, right click on the toolbox, select “Add Tab”. Name the tab to “Visual Basic PowerPack”
  3. Expand the new “Tab”. Right click in the empty space under the new tab and select “Choose Item”. You’ll see the following dialog popup…

    Adding reference to Visual Basic powerpack

    Adding reference to Visual Basic powerpack

  4. Please give it few minutes to load all items. Please select “.Net Framework Components” tab if its not already selected.
  5. In the filter text box control please type in “Power”. You should see something like this in the above dialog…

    Choose toolbox items

    Choose toolbox items

  6. Check the relevant ones and add them to your toolbox as shown below…

    Adding Filter for powerpack in the Choose toolbox items dialog

    Adding filter for powerpack in the Choose toolbox items dialog

  7. Once you click ok, you should see the following controls added to your toolbox…

    PowerPack controls listed in VS toolbox

    PowerPack controls listed in VS toolbox

  8. In my case I’ve added all powerpack controls to my toolbox.
  9. You might also have to add a reference to this new powerpack library if you still see compilation errors. Be aware that the assembly name has changed as well…

    Adding reference to new powerpack library

    Adding reference to new powerpack library

Conclusion

We’ve had couple of customer’s who report that Visual Basic powerpack is missing from Visual Studio 2013.
http://connect.microsoft.com/VisualStudio/feedback/details/801421/microsoft-visualbasic-powerpacks-vs-dll

Enjoy the powerpack.

Please Share...