When I started using the syncfusion grid I was happy to find that I could use it with DataTemplates but this soon turned to frustration when I realised it didn't really work that well with them. The main problem I found was that they had replaced the standard DataContext with "CellBoundValue" and that I had to use this everywhere. At first I didn't consider this to be much of an issue but it soon became apparent that this would mean I would need to define every template I use twice, once for the grid and once for everything else. I found a way to get around this which I think works fairly well but it is still a workaround that I feel should not be necessary. I've posted my solution below. My question is, is this the best way to do things? Am I missing something? Is there a simpler way?
For syncfusion staff, is there any plans to remove the need for this "CellBoundValue"?
I've attached a project for VS2010 that shows my solutions. The first is for when you need to use the default template for an object (see GridContentTemplate). The second is when you want to specify the template to use. In my example, the first column in the grid uses the default template for a Person object but the second column specifies a template. In both cases we avoid the need to litter our templates with references to CellBoundValue and can re-use the template elsewhere.
SFGridTemplates_e0d25f9d.zip