WPF DataGrid: Tri-state Sorting sample

Here is a short sample on how to create a tri-state sorting experience with the WPF DataGrid.  In the current design, when clicking on a column header it will toggle sorting of the column starting from ascending to descending.  Unfortunately you cannot get back to the original state without adding your own custom logic for…

16

WPF DataGrid: Working with DataGridComboBoxColumns CTP (Part 2)

UPDATE: DataGridComboBoxColumn has been updated from CTP to V1.  See the post here for the updates to the DataGridComboBoxColumn as well as an updated sample.   Previously I started a post on DataGridComboBoxColumns where I introduced the APIs specific to it and showed an example of how to use it.  Well, one thing I didn’t show…

23

More DataGrid Samples: Custom Sorting, Drag and Drop of rows, Column Selection, and Single-click Editing

Jossef just wrote this great post on improving sorting in the DataGrid through a custom sort.  Check it out here. Ben Carter also added another sample that includes row drag-and-drop and column selection through cell selection.  You can download that sample here. One way to get single-click editing to work is to hack into one of…

14

WPF DataGrid: Working with DataGridComboBoxColumn CTP

UPDATE: DataGridComboBoxColumn has been updated from CTP to V1.  See the post here for the updates to the DataGridComboBoxColumn as well as an updated sample.   If you haven’t already, you can download the binaries and source for the DataGrid v1 here.  DataGridComboBoxColumn is a column that deserves some special attention.  What makes it a little unique is…

12

WPF DataGrid sample: Add a preview ToolTip to a ScrollViewer

A customer was asking for a sample of a preview ToolTip on scrolling for the DataGrid and Ben Carter, one of our awesome Devs, wrote a sample here for any general ItemsControl.  If you haven’t already, you can download the binaries and source for the DataGrid here. With Ben’s sample I’ve put it to use in the DataGrid. …

19

BindingGroups and IEditableCollectionView

Recap In a previous post I introduced the BindingGroups.  Well now I want to get into some of the things you may run into when trying to use IEditableCollectionView with BindingGroup. BindingGroups and IEditableCollectionView So now with the BindingGroup feature in WPF 3.5 SP1, there is this slight duplication of transaction methods between the two…

4

WPF DataGrid: Stock and Template Columns

Overview The DataGrid uses a set of DataGridColumns to describe how to display its data just like a GridView has a set of GridViewColumns to describe its data.  In my first post, the sample I used auto-generated the columns for you but this time I want to go over how to create the columns manually. …

28

Another nice DataGrid "getting started" resource

Jamie Rodriguez has this really nice series on getting started with the WPF DataGrid.  Part1 is a brief introduction and overview of the features, Part2 digs a bit deeper into the features, and Part3 goes over styling in the DataGrid.  Be sure to check it out!

1

WPF DataGrid: Dissecting the Visual Layout

I’m going to be dissecting and discussing the DataGrid visuals and how they are all assembled together to form the overall DataGrid. Note: This is really more of a post for people who want to understand how the DataGrid works internally. I’m not going to be going over how to use some of the APIs…

28

WPF 3.5 SP1 Feature: BindingGroups with Item-level Validation

Motivation Before 3.5 SP1, the binding validation system worked with only one binding at a time.  What made this difficult in some scenarios was when validation was required on a set of bound objects.  Some typical examples that come to mind are a form of data items that are submitted all at once or a…

39