News: Download Silverlight 2 Beta2 for Visual Stuido 2008 SP1 and .NET Framework 3.5 SP1

I think Visual Stuido 2008 SP1 and .NET Framework 3.5 Service Pack 1 (not beta) is released today. You can go and download it from this link.

Downloads

Silverlight Tools Beta 2 has been updated to support Visual Studio 2008 and Visual Studio 2008 SP1. Here is the link where you can download the latest version of silverlight_chainer.exe.

Download

Thanks.

Any recommendation for WPF Datagrid?

Can anyone recommend the WPF Datagrid? Either the paid version or free version is okay for me. I just need nice and helpful WPF Datagird. Which Datagrid do you use in your project?

Since I have started working with WPF (Windows Presentation Framework), I’m facing some problems in choosing the WPF Datagrid that meets with my requirement. I wonder how come Microsoft doesn’t provide any build-in Datagrid for WPF. Are they giving some spaces for third-party control providers or just want to make us to spend a few bucks for buying those third-party controls? Actually, I don’t mind buying the professional version of third-party control but the main important thing is that those Datagrid must fullfill our requirements and I have to ensure that before buying.

Requirements

What are my requirements for choosing WPF Datagird?

  • Controls inside the Datagrid Column: I wanna display one or more WPF controls (e.g. Checkedbox or Combobox, Textbox or etc) inside the column of Datagrid. Plus, I should be able to set/get the value to/from those controls at runtime.
  • Excel-Like Filtering: Should we call it as the row filtering? In Microsoft Excel, we are able to filter by the rows.For example: There are ten student records showing in Datagrid and those students are from Math Major and Physic Major. So, I should be able to filter those students by Major. Yes. it’s like grouping but if I say “grouping”, you might get confused with grouping features of Datagrid.
  • Sorting, Grouping: Of course!
  • Hierarchical display: Same as Grouping featuer?  (Importantly, It would be better if we can specify the appearance of hierarchical in XAML)
  • SelectedItem Binding (two ways): I believe that this feature should be included in every datagrid but surprisely, I found a few datagrids that don’t provide this feature. Weird.
  • Less work from Code-behind file: What does it mean? It means, I should be able to do the most of works in XAML. In my current project, we are using MVVM (Model-View-ViewModel) pattern with CompositeWPF (Codename: Prism) framework so we do the most of jobs in either XAML or ViewModel (which is not a code-behind file) and we try not to write as much as possible in code-behind file.

Third-party WPF Control Providers

I googled to get the list of Third-party WPF control providers and here is what I got.

Infragistics WPF Datagrid (a.k.a. NetAdvantage for WPF)

Infragistics releases thier WPF Datagrid (they call it “xamlDatagrid”) with both NetAdvantage for WPF professional version and express version (which is FREE).

I checked the features of xamlDatagird and I found that it fullfill the most of my requirements except Excel-Style Filtering. So, I decided to explore more about that datagird and started doing a few sample with our architecture. It was cool when I was doing some basic stuffs but the problmes come when I started diving into a few more details which are very close to our current aricheture for the project ~

  • No SelectedItem: There is no dependency property called SelectedItem or equalivalient in xamlDatagrid. But they do have SelectedItems (with s). I wonder what wrong with SelectedItem. I don’t allow the user to select more than one row at a time so why do I need to loop through the SelectionItem list to get that selected item. Weird.
  • Can’t get the reference of controls inside the Datagird: Maybe, I don’t know the correct way of doing this. And also, there is no documentation or sample for that. I tried to use VisualTreeHelper class to walk throught each and every element of Datagird but I just can’t find the controls which are inside DataTemplate. (It’s so easy to do with Xceed Datagrid.). Okay. Never mind.
  • Showing the incorrect record if the datasource has some filters: I was using ListCollectionView as a datasource to bind the datagrid. There are some records that need to be excluded so I used the filter predicate for excluding those unnessary records. Then, I binded that ListCollectionView with Datagird. It works for the first time. So, I added new record to ListCollectionView and make it refresh. Opps! it shows the exclued record. crazy! then, I put WPF listview to find out whether this is a ListCollectionView problem or datagrid problem. And I found that it’s working fine with ListView. This issue is really crazy..
  • Showing wrong checkedstate when scrolling: Here is another crazy issue. I created three columns for Datagrid in XAML. One of three columns has the checkbox inside. I showed around 30 records on the datagrid but only 10 rows are viewable within datagrid since I specify the height of datagrid explicitly. Then, I run the problem and checked a couple of checkbox. After that, I scrolled up and down a bit then the checkbox that I haven’t checked are automatially checked after scrolling.

Okay. Tha’t enough. I think they need more time to have nice Datagird.

Xcced Datagrid

AFAIK, this is the most popular WPF datagrid on the net. Xcced has both FREE express version and professional version. I tried using both professional version and expression version. I’m really like it. They have really good documentation and sample. However, I got one problem that makes me to stop exploring Xceed Datagrid. That problem comes when I wanted to get the refrence of controls inside datagrid. I was able to get the reference of control but the problem was that the Datagrid doesn’t show all rows on startup. It shows the rows which are visible on the screens. It created the row dynamically while scrolling. That’s so inconvence for me since I was trying to walk through all elements of datagrid by using Visual Tree Helper. (You can read my problem in Xceed Forum. http://xceed.com/CS/forums/thread/13798.aspx)

I tried to mail serveral times to them for asking this issue. I asked them that I would like to buy the support ticket to get the fast response from developer and they replied that they don’t sell any support ticket and they supports the customers who has professional version and bought their support subscription. I told them that I’m willing to buy the professional version if they can provide me the trial version that resolve my problem. (Because I need to know whether my problem will be solved before buying the professional version or support subscription. Don’t tell me my problem will be solved after buying professional version. I’m using trial version to test whether that control has that functionality or not. Now, I found some issues so I wanna confirm whether this is a bug or my fault. ) Then, no reply. NO REPLY. So, I think they don’t have time for sales when someone is willing to buy their products.

Telerik - RadControl for WPF

Telerik is the third product that I tried for buying WPF Datagrid.They have really nice UI and RadGridView provides the most of functionalies that I need for my project.

But when I started playing with basic stuff, I noticed that the way they provides for GridView users is so much like winform or webform. Maybe, the one who designed this control has more expereince in winform or webform than WPF. I don’t feel like I’m using WPF control when I was playing with RadGridView. This is not good.

The documentation and sample are not good. (In my opinion, Xceed Datagrid documentation is much better than Telerik’s doc.) I think that they need to hire some people who have good experience in real WPF development for creating samples.

One strange is that RadGridView has the properties like CurrentRecord or SelectedItem but I can’t use two-way binding. (Xcced and Infragistic Datagrid has that feature.)

Another thing: GridView has a property called AutoGenerateHierarchyFromDataSet. I wonder why. Why DataSet? The most of us are using object and pattern these days and we are no longer using DataSet that much. I think it’s so 2005 or 2006 (when we are working with .NET 1.1.)

There is one critical issue with that control. Let’s say you are binding ListCollectionView with Datagrid. You set a filter to that ListCollectionView. When the filter returns false for all records, the exception will be thrown. It’s a major issue. I want them to fix as soon as possible.

DevExpress Datagrid

I haven’t tried that control too but that control is still a beta and it doesn’t have Excel-style filtering. Anyway, I will try it a bit now and will get back to you all.

I just finished testing DxGrid (version: 8.2.2.0) right now. I can’t believe that it failed at the first time. What did I do? very sample thing. Take a look at the following code.


private ListCollectionView _persons;

public PersonsViewModel() {
loadData();
}

private void loadData(){
List<Person> p = new List<Person>();
p.Add(new Person(){ ID = 1, Name= "Michael Sync" });
p.Add(new Person(){ ID = 1, Name= "Julia" });

_persons = new ListCollectionView(p);

}

public ListCollectionView GetData {
get {
_persons.Filter = obj => {
return false;  //Im setting a filter HERE. It works well with ListView.
};
return _persons;
}
}

I have a class called Person that has two properties such as ID and Name. In loadData, I added two new record to List<Person> and initialize the ListCollectionView. Then, I set a filter on that ListCollectionView. That code works well with WPF Build-in Listview and Xceed Datagrid. But not with RadDatagrid and DevExpTest. (sad)

Actually, I like DevExpress company since they are giving away their Datagrid for our Silverlight community. But in case of WPF Datagrid, I think they are just not ready yet for now. I hope their Datagrid will be better next time.

ComponentOne - C1DataGrid

I haven’t tried using it but I think that Excel-style filtering doesn’t support in C1Datagrid. A friend of mine who is currently working ComponentOne testing team said that he will take a look those features and will reply me soon. So, I will be updating this post once I got his reply.

Yes. I have tested C1Datagrid too. But you know what? Crash!! I placed the control on WPF user control and drag/drop a bit to change the size of Datagrid. then,  Crash! I hope my friend from C1 testing may help me to confirm this issue. My friend from C1Testing team has confirmed that this issue has been fixed in the latest build of C1Datagrid but this build is still under testing so that we can’t download it anyways. You can download the test project here. (Note: I’m using Xceed Datagrid, DevExpress Datagrid and C1Datagrid in that project so you may need to get the dlls or installers for testing my test project.)

Any Suggestion?

Yes. I would like to get some suggestions from you guys. Which WPF datagrid control are you using? Did I miss something when I was evaluting those third-party controls?

Any suggestion would be appriciated. Thanks in advance.

Unity for Silverlight, Two Samples and Test Projects are on Codeplex now.

I just committed all of my sourcecode for SLUnity to Codeplex. I have added one more sample and unit test projects at this time. You can probably download it from here. I think you guys can start playing the DI (Dependency Injection Pattern) and MVP (Model View Presenter Pattern) in Silverlight 2 beta2. You can also develop the extension (e.g. EventBroker Extension or etc) for Unity framework.

Download : Unity Community Contributions (Change Set 14032)

What’s new in this?

  • EventBrokerExtension for Silverlight and SimpleEventBroker Sample : You can learn how to CAB(Composite Application Block)/SCSF(SmartClient Software Factory) style Event Publishing and Event Subscription in Silverlight 2 Beta2.
  • ObjectBuilder.BuildPlan:  Unit Test project for ObjectBuilder
  • ObjectBuilder.Test : This is also another unit test for Object Builder.
  • SLUnity.Test: This is a unit test project for Unity for Silverlight 2 Beta2.

Notes ~

1) All of those Unit Test projects are using Silverlight UnitTest Framework from Jeff Wilcox. You can download that framework and Visual Studio 2008 template for Silverlight Unit Test from this link. If you are very new to SIlverlight Unit Testing, please take a look this tutorial.

2) As Unity.Configuration is still missing in the project, all test cases related to Unity.Configuration are removed from Test projects.

3) Due to the Silverlight Security limitation, I have to change the most of private classes, interfaces, constructors and etc to public.

4) Due to the limitation of Silverlight, all converter classes are removed.

Okay. That’s all for now. Feel free to let me know if you have any suggestion or comment. Thanks.

Related ~

Beautiful Saturday @ East Coast Park, Singapore

We had great BBQ party at East Coast Park last Saturday. We went there around 3 PM for attending skating class which is provided by our company. It was really fun. Thanks, Xuenn!!

Read the rest of this entry »

Let’s Make Money with Silverlight™ Streaming

It’s just quick news for you all. I just recieved MSDN Flash mentioned that we can earn money with Microsoft Silverlight Streaming service. You need to have an account in Microsoft Silverlight Streaming. If you don’t have an account, please click here to create one. Then, you can participate in upcoming Silverlight Streaming contextual advertising pilot. You have to fill up the publisher’s form here and submit it to Microsoft Advertising. If you are selected to participate in the pilot you will be contacted via email.Good Luck!

Congratulations To The Winners of Silverlight 2 “Write and Win” Contest

Hello everybody!!

You all are waiting for the result of our Silverlight 2: Write and Win Contest, isn’t it? Yes, we have five winners. But I’m not gonna announce that news. Oh! Don’t worry! I have invited Ivan Dragoev, Product Manager of SilverlightShow for announcing the winners of our contest. Hello Ivan, Could you please announce the winners of our contest? Thanks!

Silverlight 2: Write and Win Contest

Dear Silverlighter’s,

The Silverlight: Write and Win contest just finished. I would like to say “thank you” to all ten authors for the great articles they submitted and for the courage to show to us, the Silverlight fans and developers, what Silverlight is capable of. We believe, that such contests helps the community to grow and share.

So, having the results of the votes, I’m proud to announce the winners of our contest, the two articles, that have the most votes:

And here are the other 3 articles, randomly selected by us, which will receive Silverlight 2 in Action eBook.

Congratulations!

Ivan

Thanks, Ivan. Congratulations to all winners! I would like to say thank you to everyone who entered and to all of you who voted! I also like to say “thank you” to to Ivan Dragoev and Steven Hong for sponsoring this contest.