How to set a template to a grid cell in VIBlend Silverlight DataGrid?
|
Article Information
|
Article relates to VIBlend DataGrid for Silverlight
|
How To
|
Create and set a DataTemplate to a grid cell.
|
Solution
|
To achieve this, you need to use the SetCellDataTemplate method of the DataGrid CellsArea. The following steps illustrate how to create and set a DataTemplate to a DataGrid cell.
|
1. Specify the DataGrid's namespace.
|
|
2. Create a new DataGrid instance and add its BoundFields.
|
|
3. Create a DataTemplate which will be used as a CellDataTemplate
|
|
4. Apply the DataTemplate.
|
|
|