Click here to Skip to main content
15,886,799 members
Articles / Desktop Programming / WPF

Row Header and Cell Retrieval in the WPF Toolkit DataGrid Using the MVVM Pattern

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
13 Apr 2011CPOL2 min read 36.4K   1.6K   14  
This article shows the implementation of a row header in a grid based on data grouping, and retrieving cell information from a cell-based grid.
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace RowHeaderGrid
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void OnStartup(object sender, StartupEventArgs e)
        {
            // Create the ViewModel and expose it using the View's DataContext
            Views.MainView view = new Views.MainView();
            view.DataContext = new ViewModels.MainViewModel();
            view.Show();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
Yunyou Yao is a Senior IT Specialist in Houston, USA.

Comments and Discussions