wpf datagrid template column containing multiple controls

Aug 13, 2009 at 10:32 AM



Can a wpf datagrid template column contain multiple controls? Or just a single control? For example, a date picker, a text box, and a check box in a single templte column. If this is possible, can someone please point me to some documentation on it or post sample syntax?





Aug 13, 2009 at 12:26 PM

DataGridTemplateColumn has a CellTemplate and CellEditingTemplate DependencyProperty where you specify a DataTemplate.  The DataTemplate can really be anything you want.  Here's an example with a DatePicker, TextBox, and CheckBox:

    <DatePicker />
    <TextBox />
    <CheckBox />