Launching a custom Dialog to edit items in a DataGrid (with MVVM)

Launching a custom dialog for editing on the DataGrid is another somewhat common request that I see from the discussion list.  I thought I would provide a sample but at the same time implement it with the MVVM pattern.  The requirement that I will use on the sample is that the editing mechanism can only…

19

Exploring MVVM: Grouping with the DataGrid

Model-View-ViewModel (MVVM) is one of those really interesting design patterns that are used in WPF.  It provides a separation between the UI and business logic and uses data binding techniques to connect them together.  Karl Shifflett has some great material on MVVM that you can read about here. Anyway, I thought I’d dig into some…

9

WPF DataGrid Sample: Locking input to the row being edited

Scenario By default the WPF DataGrid will commit a row when focus is lost on the row, the ‘Enter’ key is pressed, tabbing to the next row, or programmatically calling commit on the row.  Let’s say I want to control how the user commits a row edit by locking input to just that row being…

5

WPF DataGrid – Dynamically updating DataGridComboBoxColumn

The Scenario I want to do a master detail like scenario where the selection in one ComboBox cell will update the list of items in the next ComboBox cell and so on.   Setting up the DataSource and ViewModel I will use the Northwind database for this example and will use the first column to…

11

WPF TestApi and DataGrid Sample

Our WPF Test team has just released a library of tools that can be leveraged to test WPF applications.  What’s really cool is that these are utilities that we use internally and now we can push them out to external customers for feedback and usage.  The library currently lives here on codeplex, http://www.codeplex.com/TestApi.  There are…

1

WPF DataGrid – New Item Template Sample

This sample shows how to create a template for the NewItemPlaceholder to indicate that you can add a new item.  This is what it will look like: First I will need to create a new template specifically for the NewItemPlaceholder row.  I’ve followed the general outline of the original DataGridRow control template but I’ve only…

26

WPF VSM and DataGrid Sample

Now that the Visual State Manager (VSM) is part of the WPFToolKit, I thought I’d show a basic example of how to utilize VSM with the DataGrid.  Some prereq’s and resources: ·         You can download the toolkit here ·         Info on getting VSM for WPF to work in Blend ·         General VSM resource links So,…

12

WPF DataGrid: Frozen Row Sample

It looks that this is a frequently requested feature and unfortunately didn’t make the v1.  It is still possible to extend the DataGrid to do so.  A community developer has already posted a sample on creating a footer row for the DataGrid here, http://thibaud60.blogspot.com/2008/10/wpftoolkit-datagrid-with-footer-and.html.  I thought I would post a sample for creating pinned rows…

5

WPF DataGrid - DataGridComboBoxColumn v1 Intro

Intro If you haven’t already, you can download the DataGrid v1 bits and source here.  DataGridComboBoxColumn has had a make-over since the CTP release.  In particular, the whole data binding story has been updated so that you can accomplish basic ComboBox tasks that before required some tedious workarounds.  While other stock columns such as DataGridTextColumn…

34

WPF DataGrid and the WPFToolKit have released!

Finally, the v1 WPF DataGrid is out!  This is an out-of-band release that will be hosted on the WPF CodePlex site and integrated into the WPF Framework in vNext.  You can download the bits as well as the source code here.  You also may be pleased to hear that included with the WPFToolKit are other…

29