WCF RIA Services + RadControls for Silverlight Q3 SP1

by Evan Hutnick | Comments 4

For anyone who has been paying attention, Microsoft has announced a fair number of changes and new things for us to play with over the past few weeks, suspiciously all surrounding the PDC conference in LA.  One of the biggest announcements was the Silverlight 4 beta, which I know we're all anxiously playing with, but the other was the (much needed) overhaul to .Net RIA Services, which has been re-branded as WCF Ria Services.

So what's in a new name?  Well a host of improvements, but our friend Brad Abrams covered that more than well in his Welcome to WCF RIA Services Beta post, so I won't go re-inventing the wheel and repeating him.  All I can say is - WOW!  Microsoft really listened to a lot of the issues that people (myself included) had with the previous .Net RIA Services and we have a much more mature product to work with now.

In the name of staying on top of our game, Telerik is pleased to inform everyone that as usual, we've got you covered when it comes to WCF RIA services.  Our controls are still fully compatible with this technology and our latest Q3 2009 SP1 release is actually built using the latest beta version (for those of you using previous releases, they were built with the July Preview, which Microsoft has redirected all links for so you're forced to use the new one ;) ).  Just to prove I'm not lying to you, I worked up a quick and easy example using RadGridView and WCF RIA Services (and Linq to SQL!).

You can download the sample project from the bottom of the post or just follow along here... and for reference, I'm using VS2008 for this since I'm on my main development machine, and as Tim Heuer pointed out you cannot have the VS2008 and VS2010 RIA Services installed side-by-side, but this works the same in VS 2010 (did I mention that as of the Q3 2009 SP1 release our controls are compatible with VS2010 Beta 2?). 

  1. Start a brand new Silverlight 3 Application
  2. Check to enable WCF Ria Services on the second window
  3. Now that your project is set, add some RadControls:
    RadGrid XAML setup
  4. Create a DataContext in your .Web application, build, then create a new Domain Service Class and choose the tables you want (and editing options):
    Adding a new Domain Service Class
  5. Build again. :)
  6. Add a using statement to your .Web application in your SL app
  7. Add a reference to your context and load up some data:
    Loading some data
  8. Enjoy the results:
    Happy WCF RIA'd RadGridView

So as you can see, it isn't nearly as scary as you thought to get into WCF Ria Services and to start using them with your latest and greatest RadControls for Silverlight Q3 2009 SP1 release today.

And here is a copy of the project so you can see for yourself.  I'm using Northwind so you may have to play with the connection string in your .Web project.

Enjoy!

P.S.- For anyone on the bleeding edge and wants to play with this using our new Silverlight 4 build of RadControls for Silverlight, check out this version which is using VS2010 + SL4 + Telerik RadControls for Silverlight 4 CTP + WCF RIA Services beta for VS2010.  :)

About the author

Evan Hutnick

Evan Hutnick

works as a Developer Evangelist for Telerik specializing in Silverlight and WPF in addition to being a Microsoft MVP for Silverlight. After years as a development enthusiast in .Net technologies, he has been able to excel in XAML development helping to provide samples and expertise in these cutting edge technologies. You can find him on Twitter @EvanHutnick.

4 Comments

Ghanshyam
Does this release of RadControls for Silverlight (Dec 9) need VS 2010 beta? It needs WCF RIA Services beta which does not work side by side with VS 2008, right?

I did an install now and the demos refuse to run without WCF Ria Services..which kinda makes it dependent on VS 2010?

Clarify please.
sathyan
Hi,
Thanks for the nice post. Tried to do the same but getting build error.

- VS 2010 Beta 2
- SilverLight 4
- RIA Latest Build
- RadControls_for_Silverlight_2009_3_1208_TRIAL

After adding even a simple RADontrol for SL in the page, the App throws this build error. Help is Much Appreciated.

Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
Evan Hutnick
Ghanshyam - The current release of RIA is the WCF RIA Services, and since our demos feature interaction with RIA services you will need the latest version.  I've tried to get old copies of the July Preview (which we previously used in our demos, pre-Q3 SP1), however all links from Microsoft now go to the new (and much better) WCF RIA Services.  The one hitch to all this is you can only have WCF RIA Services installed for VS2008 or VS2010, but not both. But the Q3 2009 SP1 release works just fine in VS2008 w/ the WCF RIA Services for that, so you don't need VS2010 in order to use the new release.

Long story short, you can have VS2008 and VS2010 installed on the same machine and utilize the RadControls for Silverlight (beginning with Q3 SP1) on both platforms, however you have to choose which version you want to have WCF RIA Services working with. 

Sathyan- Currently the build available is for Silverlight 3, so you would need to change the framework when you're creating a project to SL3 in order to utilize the RadControls for Silverlight in your project.  Our development team is working on a build based off of the latest SL4 binaries, however, so soon enough we'll have a SL4 compatible build ready for people to start playing with.  Otherwise, be sure you are using the .msi installer for the SP1 release as that provides all the correct references that VS2010 Beta 2 requires, otherwise VS2010 Beta 2 still has a bug in which if you just do Add References to your project from a manual installation, and if you go the manual install route you'd need to use the workaround of adding the assemblies to the VS2010 assemblies folder.
Rodrigo Rodriguez
Copy System.Core.dll, System.Windows.Browser.dll, System.Windows.dll and system.dll  from the \Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0 to the GAC folder;

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by Evan Hutnick - or - read latest articles in Developer Tools