You can find the slides and source code for DevWeek 2009 presentations on 23rd March 2009 here:-
Thursday, August 27, 2009
Saturday, August 1, 2009
In this post I am showing how to implement Column Grouping in SIlverlight 3 DataGrid,
Before starting make sure you have SIlverlight3_Tools installed in your system, not SIlverlight 3 Beta, as there are lost of changes in Grouping of Columns from SIlverlight 3 Beta to Silverlight 3 RTW.
You can follow the few simple steps below to get the Grouping for your Silverlight 3 DataGrid.
Else you can also download the code demonstrated from here.
1. Create an Silverlight Application using you Visual Studio 2008 IDE, and add a hosting web application in the project.
2. Once you have done with this, you will get an two projects in your Solution, you need to code only in your silverlight project.
3. Now add a C# class file called Person.cs in your Silverlight Project. This class is used to provide some sample data to Silverlight DataGrid, you can change this to your other datasources like SQL, XML, etc.
I have added the following lines of code in Person.cs
4. Now since my data is ready, I will add the DataGrid control in my XAML page, to make the presentation more attractive, I have added few more lines of code.
5. I have also added a ComboBox Control to Select the Grouping Columns name.
My XAML code will look something like this below.
6. Now as my Data and Presentation is ready, its time for me to write some lines of code to Retrieve my sample data, group them into columns and then Bind it to the Grid.
Please find below the rest of the Code which demonstrates how I have Grouped the Columns using PagedCollectionView and PropertyGroupDescription.
Yes its that simple, and its done. I know I have not given much description here, because nothing much to explain here. In the code above I am loading the Grid with my sample data coming from my Person class and default grouping the Person with Country.
Later on SortCombo_SelectionChanged, I am dynamically fetching the Selected column names from the ComboBox and Sorting on that.
Once you will run this application the screen will look something like this as given below.
Grouped by Country
Grouped by City
Grouped by Age
You can group according to your requirement, like Grouping Active and Deleted items, etc.
You can also download the sample code from here.
I know the code here is not very well formatted, you can also refer the following location for the more better formatted version.Silverlight 3 DataGrid Columns Grouping using PagedCollectionView
Sunday, July 26, 2009
Hi All, here is the link for the great library of cheat sheets, I assure you that after looking into this collection you will be amazed....these Cheat Sheets are...
- Written by bestselling authors and leading experts
- Reliable information on major developer topics
- Filled with useful tips and source code examples
- PDF looks great on-screen or printed from your printer
To name a few...
- Design Patterns
- Silverlight 2, I am eagerly waiting for Silverlight 3, I know its too early...
- Core .NET
- Core ASP.NET
- Windows PowerShell
These are just few of my interest, but you can always register and logon to download lot more of your interest too...from the link below.
Saturday, July 25, 2009
This is a hub for SharePoint 2007 and WSS 3.0 Resources with two advantages: All resources are hand-picked and vetted for quality, and each topic contains a with hand-tuned search designed to return the latest content which you can then filter further to find what you need.
Thursday, July 23, 2009
A common problem when developing Silverlight applications is how to share classes and in particular (Entity Framework) entities which are compiled for the full .NET framework in a Silverlight application. Silverlight is a browser plugin and a platform independent subset of the full .NET framework. Therefore Visual Studio does not allow referencing .NET assemblies from your Silverlight application.
Fortunately there is a very simple technique to share and reuse source code. Full details of which you can find in the link below
In this article Stefan Cruysberghs demonstrated this technique with several real world examples and I will give you some handy tips.
- Referencing assemblies
- Linking files in Silverlight assemblies
- Using the SILVERLIGHT compiler directive
- Sharing code between WPF and Silverlight
- Sharing (POCO) entities between your .NET domain layer and Silverlight
- Sharing extension methods between .NET and Silverlight
- Sharing logic in your Entity Framework entities between your .NET domain layer and Silverlight
- Sharing common logic and separating framework dependent implementations
This linked has helped me, as I have SOA, where WCF Services, DataContracts, ServiceContracts are shared between my ASP.NET , WPF and Silverlight application.
Monday, July 20, 2009
As currently I am working on Migration from Silverlight 2.0 to Silverlight 3, so I thought to share or bookmark few of the important links which I am going through.
Find below the links
The following list encompasses all changes made between the Silverlight Toolkit March 2009 release and the Silverlight Toolkit July 2009 release.
The following list encompasses all change made between the Silverlight Toolkit December 2008 release and the Silverlight Toolkit March 2009 release.
In the process of upgrade there are few more challenges I am going to face
Upgrade of my WCF Services to implement Silverlight 3 Validation controls, as my DataContract is residing in Service Layer, and I am using WSSF to generate the WCF DataContract, ServiceContract, etc. As all the DataCOntracts are AutoGenerated so implementing the Validation in Silverlight will be bit tricky.
Since I still I am in the process of upgrade, so if you too have some good links which will help me to upgrade my Services as I mentioned above then please do share here.