How to set Resources for DataGridTemplateColumn

Jun 9, 2009 at 8:34 AM

I implement a Customize Control of DataGridTemplateColumn and let it derive from DataGridTemplateColumn, but how to set its Resources, since I have one defined ResourceDictonary.

Dose anyone know the answer?Thanks very much! Dan

Jun 9, 2009 at 8:44 PM

Hi Dan,

You should be able to set the Resources on the DataTemplate which you put inside the CellTemplate of your DataGridTemplateColumn, like so:

                            <DataTemplate Resources="...">

Is that what you were looking for?


Jun 16, 2009 at 10:48 AM
Edited Jun 16, 2009 at 10:49 AM


If i want sorting facility on this "DataGridTemplateColumn" then How can i do it Because i tried it but Sorting is not Working on this......

Jun 16, 2009 at 9:16 PM

Hi Yagnesh2879,

This article will show you how to setup your Custom sorting for a DatgridTemplateColumn.