Introduced
Silverlight 2.0 detailed DataGrid, binding data to ListBox:
AutoGenerateColumns-Automatically generate columns based on data source
Rowdetailsvisibilitymode-display mode used when displaying detailed data for the corresponding row
Datagrid.columns-Manually define the columns of the DataGrid
Datagrid.rowdetailstemplate-template for displaying detailed data for the corresponding row
Arerowdetailsfrozen-whether to freeze Rowdetailstemplate
GridLinesVisibility-How table dividers are displayed
Rowbackground-odd data row background
Alternatingrowbackground-even data row background
IsReadOnly-whether the cell is read-only
Frozencolumncount-The total number of columns frozen in the table (starting from the left)
SelectionMode-Select mode for row
Canuserreordercolumns-Allow dragging of columns
Canuserresizecolumns-Allows you to change the width of the column
Canusersortcolumns-whether to allow column sorting
Verticalgridlinesbrush-Changing the vertical divider line of the table Brush
Horizontalgridlinesbrush-Changing the horizontal divider line of the table Brush
Headersvisibility-Display of headers (including column headers and wardrobe)
Online Demo
Http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html
Example
SourceDataModel.cs
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace Silverlight20.Data
{
public class SourceDataModel
{
public string Name { get; set; }
public int Age { get; set; }
public DateTime DayOfBirth { get; set; }
public bool Male { get; set; }
}
}