The WPF DataGrid is finally here!!! - Rudi Grobler

The WPF DataGrid is finally here!!!

Well, their is a huge hype surrounding the release of .NET Framework 3.5 SP1 & Visual Studio 2008 SP1! The one release that has silently gone unnoticed is the release of the WPF DataGrid (CTP)

The binaries and source is available for download here

Here is a list of some of the features:

  • Auto-generation of Columns. Simply hook up the DataGrid to an ItemsSource and at runtime it will auto-populate with variety of pre-built column types. You can also hook into column generation events to modify the columns as they’re created, or specify columns in the XAML.
  • Variety of Column Types. Text, CheckBox, ComboBox, Button, and Hyperlink columns are standard column types. You can also use the TemplateColumn to create your own custom column.
  • Row and Column Headers. Headers for both rows and columns can be toggled on and off.
  • Grid Lines. Horizontal and vertical grid lines can be toggled on and off and styled.
  • Column Width Behaviors. Columns can be set to auto-size to header or cell content, fill the remaining space (* behavior), respect max and min values, or set to an absolute width.
  • Cell Editing. Edit cell content and submit changes back to the database.
  • Selection. Row-only, cell-only, or row and cell selection can be enabled.
  • Keyboard Navigation. The entire grid can be navigated with keyboard only.
  • Column Resizing and Reordering. Columns can be resized and reordered programmatically or by the user through drag and drop in the UI.
  • Column Sorting. Columns support sorting and multi-sorting by end-user and programmatically.
  • Fully Style-able and Template-able. The DataGrid and all of its elements are fully style-able and template-able. Customize the look and feel of the grid, or make it look nothing like a grid at all (e.g. card view).
  • Add and Remove Rows. Add new items to the DataGrid or delete items from it. Customize the default value for a new row.
  • Row Validation. Create groups of validation rules to apply to rows.
  • Filtering/Grouping Support. Support for filtering and grouping data through CollectionViews.
  • Clipboard Operations. Built-in Copy support with extensibility for Cut and Paste.
  • Performance. Strong performance for scenarios with thousands of rows and many columns.
  • Read more here

    [UPDATE] Here is a short CodeProject article on how to get started!

    Vincent Sibal has a excellent post about the DataGrid

    Jaime Rodriquez has a EXCELLENT 3 part series on how to customize the DataGrid (Part 1, Part 2 & Part 3)

    If you found this blog post useful, please kick it on DotNetKicks.com

    Published Tuesday, August 12, 2008 8:04 AM by rudi

    Comments

    # The WPF DataGrid is finally here

    You've been kicked (a good thing) - Trackback from DotNetKicks.com

    Tuesday, August 12, 2008 8:08 AM by DotNetKicks.com

    # re: The WPF DataGrid is finally here!!!

    It seems that MS tries a lot of other things go unnoticed. SP1 PR program as far as I remember was based on data grid, Ribbon control, item controls virtualization, more efficient DirectX integration, etc. That's pity we again get nothing except promices

    Tuesday, August 12, 2008 8:33 AM by Denis Vuyka

    # re: The WPF DataGrid is finally here!!!

    Denis-

    I'm sorry you feel that way. I hope we've never said that .NET 3.5 SP1 would include a datagrid or ribbon control.  We tried to message our intentions appropriately:

    Scott Guthrie's blog post announcing SP1 said: "We'll be using this support together with the above data binding improvements to build the new WPF datagrid that will be shipping later this year."

    My public talks at Mix08 and TechEd08 also said that they weren't coming with 3.5sp1, but would be built upon 3.5sp1.

    DataGrid/Ribbon are on the way.  DataGrid is further along, reaching CTP this week.  We're continuing to execute on our announced plans.  Sorry if we said anything to mislead you.

    Thanks,

    Rob Relyea

    WPF Team

    Wednesday, August 13, 2008 3:01 PM by Rob Relyea