Introduction

Play with is and if you like this, continue reading and be confident that you can leverage all this in LightSwitch as well, without having to buy expensive 3rd party extensions or controls. Furthermore the fact that the control is part of the silverlight framework is a garantee for high quality !

Let’s get started with a basic example.

We’ll build an example to visualize a fictious movie database. I have no real movie database at my disposal. So we’ll make sure we can easily construct some random test data. The idea is that you have the pivotviewer up and running in less than 3 minutes. I’m using visual studio 2012.

Let’s start with a very basic movie table containing only following fields:

Next, generate a simple ListDetail screen for the movie entity type and attach a button to the screen and call it “AddTestData”.

Consume the PivotViewer in your LightSwitch project.

We are almost finished. Start from a “New Data Screen” and do not attach it to any screen data. Now simply add the custom control to this screen:

Make sure to click in properties Change… and select the MoviePivotControl. Disable paging on the Movies query and change in the properties of the custom control also the label position to “None”.

Start using the pivot viewer.

F5 you LightSwitch project and first generate some test data in the Movie ListDetail screen. Go then to the pivot screen and you should see this:

You can click on a card which will visualize the movie details:

Of course the real fun is the filtering and searching:

You can search on the movie name. The following example shows all movies with “3” in the name:

You can filter as well on the Release date, but also on the category. In order to see the category filters, first click on the ReleaseDate header which will unhide the Category filter:

The following reveals the real intelligence of the PivotViewer control: first make a filtering on the ReleaseDate for a year where there are less than 4 movies. Now, go to the Category filter. You will see that only the categories can be selected applicable to what’s relevant given your selection on release date:

Conclusion

I limited deliberately this demo to a very basic example. Trust me, the real fun comes in later posts I’m planning to do on this subject:

Paul you can also use the odata to cxml example on the silverlight site. Then u can do this off sharepoint lists too

paul van bladelSeptember 22, 2012 at 3:13 pm ·

Dave,
Sounds interesting. Can you provide further pointers?
thanks
paul.

CiroOctober 4, 2012 at 1:11 am ·

Hi, Paul!

Is it possible use PivotViewer with VS2010?

Best regards,

Ciro.

paul van bladelOctober 4, 2012 at 1:38 am ·

Hi Ciro,
Good question. I think it’s not directly related to the visual studio/LIghtSwitch version, but I’m sure it’s a silverlight 5 control. It won’t work with silverlight 4.

ChrisOctober 15, 2012 at 5:06 pm ·

Hi Paul,

For whatever reason, I can’t get this example to work, or any of the examples. I have tried repeatedly, yet all I get is blank screen. Do you have a sample project I could download to see what I am doing incorrectly? Thanks!