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.

42 thoughts on “Any recommendation for WPF Datagrid?

  1. You can put the xceed grid in a StackPanel (without MaxWidth/MaxHeight) as a workaround. I haven’t tried it (and do not see a scenario where I’d want to) but according to the doc it should work.

    From the manual http://doc.xceedsoft.com/products/XceedWpfDataGrid/

    “Getting Started”->”Creating your first DataGrid Project”

    “By default, a grid will take all the room that it requires; therefore, if it is not given a size constraint, such as when it is placed in a StackPanel, and a large amount of data items are present, UI virtualization will be lost—resulting in a significant loss in performance. To preserve UI virtualization when a grid is in a StackPanel, the MaxWidth and MaxHeight properties (or Width and Height) must be used to constrain the grid. As an alternative, a DockPanel or Grid can be used as both impose size constraints on their child elements.”

  2. Hi, we are currently using Xceed Wpf datagrid for production developement. We made this choice on January 08, we are rather satisfied. One has to know that it is the grid that has been chosen by MS for their inside dev on WPF, the reason was that it was the most advanced Datagrid in the beginnings of 2008. They are going to release a new version at the end of August with several enhancements. Infragistics was (in the early 2008) not stable enough.

  3. Hello Odi,

    Thank you so much for your reply. As I mentioned in my post, I’m really like Xceed Datagrid but you know, it doesn’t make sense for me to buy any product or subscription before I’m not so sure whether it will work or not..

    I created a sample for you. You can download it.

    http://michaelsync.net/demo/XceedTest.zip

    Note: I don’t have the boolean field in my entity object so I can’t bind the column with bool field.. We may have other controls like combobox or our custom controls or other third-party control instead of checkbox in future..

  4. Mike; I meant to send you an email earlier but got side tracked. Last year I was about to do a project in WPF and based on my [one year ago] findings, the Xceed was the most complete. But the client switched from WPF to WinForm and we never got to use it.

    Their support was very helpful back then.

    We miss you in SL land!
    Take care and hope hear from you soon!
    ..Ben

  5. Hi Michael,

    First, thank you for taking the time to evaluate Telerik RadGridView for WPF. My name is Hristo Kosev, CTO of Telerik. I’ve been involved for some time in the development of our WPF suite, so I’ll try to answer most of your concerns in regard to using RadGridView for WPF and its current state.

    > 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.

    That’s true – most of the guys from our WPF team have strong WinForms and WebForms backgrounds. I think this is absolutely normal as both of these platforms have been around much longer than WPF. While platform specific knowledge is important, it’s much more critical that a component developer to has solid architectural skills. And those come with years of experience in the different platforms that are out there (WinForms, WebForms, etc.)
    If someone has WPF experience only (and is not very skilled in WinForms and WebForms), then WPF would be his/her first encounter with .NET, which in turn means less overall experience.

    I also wanted to add that Telerik utilizes some WPF best practices in its WinForms controls since 2006. If you review the underlying architecture of all Telerik WinForms controls you will notice that they are composed of primitives, which provide a completely customizable design for the controls.

    How do you envision a true WPF grid control to look and behave? I think all of the vendors mentioned in this post will appreciate your feedback. Honestly, I believe that we (at Telerik) have used most WPF best practices in the development of our WPF suite, because they enable make most of the features we have. We would nevertheless really like to hear your feedback.

    > The documentation and sample are not good.

    With the first release our efforts have been focused primarily on the product, which had a negative effect on the quality of documentation. For the next release (early November) you’ll see that issue addressed accordingly.

    > One strange is that RadGridView has the properties like CurrentRecord or SelectedItem but I can’t use two-way binding

    That’s really strange. We’ve just tried RadGridView in such scenario and it worked fine. You could open a support ticket from your Telerik account (http://www.telerik.com/client.net/my-support-tickets/new-support-ticket.aspx) or drop us a line in the Telerik forums (http://www.telerik.com/community/forums/allthreads/b312H-cme.aspx) and we’ll send you a sample project.

    > 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 the question here contains the answer. We (Telerik) still have lots of customers who use the plain old DataSets and we can’t ignore that. Even though we’re all big fans of patterns & practices and best approaches, we can’t disregard our customers who have chosen DataSets and who feel more comfortable with setting the hierarchy there than learning our API.

    > There is one critical issue with that control. Let’s say you are binding ListCollectionView with Datagrid.

    We have already verified this issue and it has been set for fixing with the highest priority for the service pack we’re about to release at the end of August.

    As a final note, I would like to say that Telerik RadGrid for WPF is one of the few WPF DataGrids, which are ready for production, i.e. it is not in beta. It has been tested to provide outstanding performance and remarkably flexible hierarchy model, without sacrificing interactivity or customization. In case you decide to play with it some more, and should you encounter any issues, please don’t hesitate to contact us through our support system. Our support staff is on standby and will be happy to address all your concerns.

    Hristo Kosev
    CTO
    Telerik

  6. Hello Hristo,

    Thanks a lot for your explanation.

    That’s really strange. We’ve just tried RadGridView in such scenario and it worked fine

    Here is a sample project for you..
    http://michaelsync.net/demo/TestProjectforTelerik.zip

    I also posted the question in your forum.. http://www.telerik.com/community/forums/thread/b311D-bkkdaa.aspx

    Note: I think that there is a wrapper for data object in your datagrid. so, I think it might be the reason why it’s not working. maybe, I think I need to call DataWrapper.ActiveRecord or something…

    We (Telerik) still have lots of customers who use the plain old DataSets and we can’t ignore that.

    I understand. but why don’t you just have one property called AutoGenerateHierarchy that can show the hierarchical structure from any datasouce (e.g. nested objects or DataSet or etc.)?

    That’s why I was thinking that your datagrid supports winform/webform style than WPF.

    We have already verified this issue and it has been set for fixing with the highest priority for the service pack we’re about to release at the end of August

    Can we get this sp earlier?

    In case you decide to play with it some more, and should you encounter any issues, please don’t hesitate to contact us through our support system. Our support staff is on standby and will be happy to address all your concerns.

    Yes. I have to play a bit more on how to put some controls in hierarchical structure of datagrid and excel-like filtering.

    thanks again for your comment. I will contact with your support team if I face some problems.. thanks…

  7. I would rather use simple aspx page than using third party control. I would hold working on WPF and wasting my time.

  8. >>Actually, using good third-party control saves a lot of your time…<<

    ;-) Great answer Michael…

    I’m currently doing beta testing on telerk Silverlight product. Great company. Never seen customer service like them and caring about the developers community. To me, that’s one of the key element for choosing a product.

    Another great company with humble attitude and listening ear, is ComponentOne. I’d put these two companies on the top of my list. Be sure to drop a note to Bernardo at C1 as well.

  9. Hey Ben,

    Yes. The customer service from Telerik is really good.

    Xceed and Telerik are on the top list for WPF datagrid so far… I need to choose one of them. I got the reply for enabling visualization of datagrid from Xceed team too so our problem is solved. (Thanks, Xceed) I need to take a look at Hierarchical display or grouping with custom style. then, we have to decide which one we should buy…

    Do you know with Bernardo? cool! I met with him when he was visiting to India.. I think it was around 2004 or 2005.. Yes. I’m sure that he has strong technical skill..

  10. Hi,

    “Crash problem on drag/drop/changing size of C1Datagrid on WPF user control” have been fixed (verified in VS 2008 SP1) in the latest build which is under test for regression part.

  11. Hi YM,

    Thanks for confirming this issue. I’m glad to hear that that issue has been fixed in latest build.

    Anyways, I think we may choose either Telerik or Xcced for our project since those controls seems more stable.. Thanks again.

  12. Hi,

    For our product we tried the Xceed datagrid but we found it very limiting (we have some slightly esoteric requirements and need to heavily reskin the grid). We then switched to infragistics but it was just too buggy and the support wasn’t very good.

    We are now using Telerik and are generally very satisfied – the support has been excellent and the component is being very actively developed. Additionally is has been easy to hook into the functionality and reskin what we need. I would be interested to know why you don’t think it feels ‘WPFy’ because we felt that of the 3 we tried it had the most WPF like architecture.

    Will

  13. Hi Michael,

    Thanks for the sample project. It helped us reproduce the problem and the guys will contact you shortly in the Telerik Forums with either a workaround, or a fix in the next service pack, if it turns out to be something more time-consuming.

    > I understand. but why don’t you just have one property called AutoGenerateHierarchy that can show the hierarchical structure from any datasouce (e.g. nested objects or DataSet or etc.)?

    Mostly because this way we would fool the users that we can auto generate hierarchy from everything which is not true, at least for now :). With DataSets it’s very straightforward to define a hierarchy because we have relations. In an object hierarchy one possible way to auto-define a hierarchy is to drill down through all the properties of type IEnumerable or IList. We’ve been thinking about this, but we didn’t have enough time to do this for the first version. We’ll definitely consider it for the next version as this feature makes a whole lot of sense.

    > Can we get this sp earlier?

    We have firm timelines for both the official releases and the service packs, but since this is a showstopper for you, we could send you an intermediate build once we fix the problems. Let me know (either here or in our Forums) whether this is ok with you.

    Once again, thank you for your feedback and for helping us improve our products!

    Best wishes,

    Hristo Kosev
    Telerik

    P.S. Will, thanks for the thumbs up, much appreciated!

  14. I’ve tried Xceed datagrid, and I am surprised how slllooowwww it is (scrolling is so slow, even with as little as 50 rows).

    I can’t use such a control in a software, my customers will tell me : “I don’t want you app, it is too slow”.

    Is any other datagrid for WPF fast ? Maybe the Microsoft one ?

  15. PierreMF,

    Version 3.0 of Xceed DataGrid for WPF, released a week after you posted, has greatly improved performance. There’s no faster grid overall not even Microsoft’s (there are cases when scrolling the MS grid is faster when there aren’t many rows or columns) but we haven’t had any more complaints about speed since v3.0.

    Hope this helps,
    Odi

  16. @Odi,

    Thanks, i’ll download version 3 of XCeed.

    Anyway, I think I’ll use a listview control. They are really faster than datagrids, especially when it comes to scroll performance.

    And when I want to edit a row, some WPF SDK samples show how to edit items.

  17. PierreMF,

    If you are going to PDC 2008 this year, come by the Xceed DataGrid for WPF booth, there’s going to be something interesting to see regarding performance. In any case, I’m sceptical about listviews being faster in general. I have a feeling scrolling, sorting and loading time when there are lots of rows or lots of columns aren’t going to be as fast as our grid. Haven’t tried the .NET 3.5 SP1 listview, though.

    As for editing with a listview, I suppose you can shoehorn editing capabilities into it, if your needs are minor.

  18. ‘Something interesting’..

    Is 100 MB RAM penalty for few rows and 20% CPU utilisation doing nothing..

    The whole show needs to be fixed, no one anywhere close to serious would torture their customers with software that freezes with 10,000s of updates a second..

  19. Not sure what you mean, “LOL”.

    Microsoft is using Xceed DataGrid for WPF in Visual Studio Team System 2010. They love it. With v3.0, they aren’t requesting more perf. updates. IBM is using it in SystemBuilder, same thing. Are they considered, in your mind, “close to serious”?

    On the other hand, our Datagrid probably doesn’t handle “10000 updates a second”, whatever that means.

  20. So, we should use Xceed for Grids, but for another things in WPF like ribbons, dockings, editors, charts, etc. which one should we use??
    Sorry my question, but I´m a begginer in WPF.

  21. hi i am workng on wpf datagrid which is provuide by the microsoft and it is pretty cool.. It covers all u r issue except export to excel

  22. I have been using DevXpress wpf grid version 9.0 and its good with lot of improvements compare to previous versions.

  23. Hi Micheal… Thanks for the blog.. I am using a Component1 DataGrid. Is there any way i could get the SelectedItem in a Component One grid from XAML.. Thanks for your Comment in Advance..

  24. Hi Micheal,

    This Grid comparison article is good. i wanna ask you, today which gird do you suggest to use in Wpf for CRUD operation and Cell editings And Excel like features.

  25. http://michaelsync.net/2008/08/09/any-recommendation-for-wpf-datagrid
    Hi Micheal,
    thanx but i want you to include your test grouping, filtering, sorting performance on real time update, and using with CustomTypeDescriptor.
    We cant find any fit 3rd party tool yet.

    Any suggestion.. Until now we test and unfortunately elect

    Syncfusion(8.3.0.22): too many bugs and really bad testers.
    Mixed inh. grouping problem (try to cast all row to first row type like first row is Foo second row is YeeFoo and third row is MeeYeeFoo Its not problem when first row is Foo, but when first row is YeeFoo) .
    Performance problem in sync dock pane.
    Filter (like excel) not update items on data update (and filter choose list).
    Horizontal Scroll is too slow

    Devx (v2010 vol 1.7) : Hierarchical and grouped data expand/collapse and Horizontal Scroll is too slow.

    Infragistics(20103): Doesnt update group/sort on row data update ( sort can be fixed with record.RefreshSortPosition())

    ComponentOne(2010v2) : Doesnt support CustomTypeDescriptor (it uses reflection only)..

    Telerik(2010_2_0812): Doesnt support group on data update

    Our requirements:
    -Supports CustomTypeDescripters
    -Grid Sort, Filter, Group, Summaries update on data update
    -Good performance on horizontal scrolling
    -Hierarchical and grouped data expand, collapse performance

  26. Hi,
    The review starts off with a very childish complaints about SelectedItems in Infragistics datagrid. Then it goes on to tell us that the author could not figure out his way around the object model. This is laughable.
    I assume that the depth and reliability of the rest of the review is same.
    Just a big waste of time.

  27. Hi Helen G,

    Sorry for wasting your time.. It was written long time back. We need the bindable “SelectedItem” .. Would you mind telling me what you would do if you want to bind the selected item of Datagrid with the object from ViewModel but Datagrid doesn’t provide that dp prop? attached property on your own?

  28. Hi Micheal,

    Thanks for the blog. After evaluation of all the third party tools, we started working with Syncfusion controls for Grid, Chart, Ribbon & Docking manager. All the features they exposed are working fine with our environment. Also what the best thing with Syncfusion is the support system they are having, we can get the fixes for the bugs with in 10 days. Great Experience.

    Thanks,
    John

Leave a Reply

Your email address will not be published. Required fields are marked *