DataGridCell Template with WPF Toolkit Datagrid

Jan 13, 2009 at 3:14 PM
Hello All,

How can I use the DataGridCell Template with WPF Toolkit Datagrid. I like to create a Cell Template and like to apply that template for all cells.

For example:

<Style or something x:Key="myDGCellTemplate">
           <Button Content="AA" />
           <Textbox Text={Binding .}  />
</Style or something>

<toolkit:DataGrid x:Name="myDataGrid" ItemSource="{Binding myDataSource}"
   CellTempleteORSomething={StaticResource myDGCellTemplate}" AutoGenerateColumns=True>


Can I use "." in Binding? As the column will be generated dynamically based on the Data Source, I don't know the column name. So, I want to set whatever column that I got to the textbox.

Thanks in advance.
           <Textbox Text={Binding .}  />
Jan 15, 2009 at 12:33 PM
You should look into using DataGridTemplateColumn.  You can read more on it here,