Vincent Sibal's Blog

WPF Programming Topics

Browse by Tags

Tagged Content List
  • Blog Post: 5 More Random Gotchas with the WPF DataGrid

    1. DataGridColumn.SortDirection does not actually sort the column. DataGridColumn.SortDirection is used to queue the visual arrow in the DataGridColumnHeader to point up, down, or to not show. To actually sort the columns other than clicking on the DataGridColumnHeader, you can set the DataGrid.Items...
  • Blog Post: 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...
  • Blog Post: 5 Random Gotchas with the WPF DataGrid

    Since the release of the WPF DataGrid there have been several common patterns of questions that developers were asking on the discussion list . I thought that I would capture some of that here so it would be easy to find. I'll also try to keep it as short as possible and refer to other links for more...
  • Blog Post: WPFToolkit March 2009 Release and new WPF Themes!

    An updated version of the WPFToolkit has been released today. This includes some high pri bug fixes which are briefly described in the downloads tab. As a reminder, if you have any questions or find any issues please use the Discussion list and the Issue Tracker . Enjoy! Also, a new set of WPF Themes...
  • Blog Post: 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...
  • Blog Post: 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 edited and having...
  • Blog Post: 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 select...
  • Blog Post: 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:/...
  • Blog Post: WPF DataGrid Design-time Walkthrough

    The DataGrid walkthrough on windowsclient.net/wpf and the Tips & Tricks section on codeplex talk briefly about the Design-time support for DataGrid. I thought I’d expand on that just a little more so you get a good idea of what you have available. Installation So to get it to work you need...
  • Blog Post: 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...
  • Blog Post: 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, what...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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 controls...
  • Blog Post: Overview of the editing features in the WPF DataGrid

    Introduction I’m going to talk a little on the editing features of the DataGrid. I will dive deep into a couple things but overall I just want to give you a good idea of the APIs you can work with and how to tweak a couple things. So basically I will be introducing a bit of the internal implementation...
  • Blog Post: Pasting content to new rows on the WPF DataGrid

    On a previous post I talked about how to implement Clipboard.Paste for the DataGrid. The functionality was such that you could only paste to existing rows and cells. I got a customer request on how to paste to new rows so I thought I’d capture it here. If you want to be able to paste to new rows,...
  • Blog Post: WPF DataGrid - Clipboard Paste Sample

    In the v1 release (and CTP) of the WPF DataGrid there will be support for Clipboard.Copy but no support out of the box for Clipboard.Paste. However, there is extensibility support for Clipboard.Paste which I will show how to implement in this post. In DataGridColumn.cs an additional API, OnPastingCellClipboardContent...
  • Blog Post: WPF DataGrid – Styling rows and columns based on Header conditions and other properties

    There have been several questions on the WPF CodePlex discussion list relating to styling rows and columns based some requirements on other elements or some other conditions. I decided to put a couple examples here on different ways you can accomplish this. Adding a trigger to a CellStyle based on...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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!
Page 1 of 2 (27 items) 12