WPF Grid is in Play

I've been waiting for the DataGrid to show its face amongst the WPF community and now it has. Xceed has done a great job in providing folks the ability to have data grids housed inside WPF applications.

I'm not entirely sure how they did it specifically, but my theory would be that it's probably a display list of items, and maybe it's 20 at a time (20, 40, 100 etc). In each list item, there is most likely a cell renderer, in which you the developer could have your pick / choice of how an individual cell could be rendered. So for alternating rows you may choose a different texture or style to accommodate this and so on. Then as you scroll down, it's refreshing the 20 rows of cells only (appearing to scroll). That would be my theory anyway.

I know in the FLEX world of things, putting together a DataGrid component is no easy thing, but WPF and FLEX have a lot in common when it comes to this, so if you're looking to build your own DataGrid, it may pay to observe and analyse how other technologies are doing it. At the same time, remember that it's sleight of hand when dealing with large datasets. In that, you could have say 1 billion rows of data ready to be served inside a DataGrid and to do this you simply decrease the scroll thumbnail, and allow the user to scroll down (all the while each increment it moves up and down is hyper sensitive based on the data amount). As the user scrolls down, they are essentially moving through partitions of data inside your persistence layer (MS SQL, ORACLE etc) and you're only asking for around 100 rows of data at time. So it appears there are large amounts of data, but its sleight of hand.

That's the theory anyway. Great work Xceed!

Comments (5)
  1. I know in the FLEX world of things, putting together a DataGrid component is no easy thing,


    <mx:DataGrid />

    What is hard about that?

    mike chambers


  2. Garry Trinder says:

    Sorry I meant the code behind that Tag. In that if you wanted to go beyond just simple data grid, then it’s quite complex tag to understand.

    CellRenderer’s only go so far Mesh 🙂

    (I’m praising FLEX btw, so chill, in that the DataGrid tag was pretty cool tag all said and done in the way it has been assembled. Many have tried to go down that path, but the Flex Framework has done an alright job in terms of starting points. I’ve had to monkey with it more to get large datasets in place, that or tree based views in datagrid that adhere to skinning, but thats cool, as I went off the reservation).

    WPF on the other hand, can learn some lessons from FLEX DataGrid and maybe even some of the .NET versions or (insert other language here).

  3. Phillip Kerman says:

    I was all psyched to view this but I only have .Net 2.x.  Why not drop a WPF/e version up?   That uses just an active x plugin?  I really thought I could view it.

  4. Garry Trinder says:

    Time and two hands 🙂

    I’m heading to Seattle (next week) to TechReadyR4, where I am looking to get more hands on with the MS HQ folks on WPF/E and WPF.

    So I’m hoping to pump out some WPF/E demo’s and I’ll add the DataGrid to the list as in theory, it should be quite dooable but I’m still playing catchup and theories are all I have at the moment.

  5. Joseph says:

    The WPF toolbelt project on codeplex also has a grid, but it is pretty rudimentary. http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=wpftoolbelt

Comments are closed.

Skip to main content