* You are viewing the archive for September, 2010

Datagrid: support for grouping on columns use IValueConverters to display their value and conditonal rowstyling

DataGrid update


Some further enhancements have been made to the DataGrid wrapper that has been the subject of this previous post:

  • Support for grouping on columns that use IValueConverter to display their value
  • Conditional row styling

This post is a code drop for these enhancements.

Conditional row styling

The following code gives a sample on how to use conditional row styling:

public MainPage()

theDataGrid.ItemsSource = PersonFactory.GetAllPersons();

theDataGrid.RowStyles.Add(new MyDataGridRowConditionalStyle(
(o) => { return ((Person)o).Name.Contains(“A”); },
Continue Reading