Declined
Last Updated: 21 Apr 2015 13:04 by ADMIN
ADMIN
Pavel Pavlov
Created on: 12 Apr 2010 09:35
Category: GridView
Type: Bug Report
11
CellTemplate in WPF does not respect DataTriggers
When you place a DataTrigger whithin a CellTemplate, it is being ignored by RadGridView for WPF

Workaround ( until fixed ) - set the ContentTemplate of the cell via Style in a static resource instead.
5 comments
ADMIN
Maya
Posted on: 21 Apr 2015 13:04
Indeed, it has been awhile, but we tried to find a solution that will not break the current functionality or introduce performance problems. With WPF DataGrid DataTemplate used as CellTemplate is set directly as ContentTemplate to the cell and all triggers are directly transferred. 
However, with RadGridView the content of the cell is set from template.LoadContent() method and is returned from the CreateCellElement method of the column. 
One possible scenario for a fix is to change that behavior and apply directly the template as WPF DataGrid does. However, this is a huge breaking change with CreateCellElement method is widely used. The second approach is to leave the code as it is right now, return the element from LoadContent method of DataTemplate and set the ContentTemplate property of the cell to that DataTemplate. This will cause the content to be loaded twice. Which will degrade the performance. 

So, as it turns out the solution is either to introduce breaking change, or degrade the performance. Both of them are against our believes and efforts to improve the controls. 

Our suggestion is to use the workaround by setting triggers directly to the style. We do hope you understand our concerns. 
Lisitsa
Posted on: 10 Feb 2015 13:11
Framework limitation? But it's working in standard WPF DataGrid!

It's five years already...
ADMIN
Dimitrina
Posted on: 16 Sep 2014 14:04
As it turns out this would be a framework limitation and therefore we cannot resolve it for RadGridView.  I can suggest you using Style.Triggers instead.
Jon
Posted on: 03 Dec 2012 15:01
Still not resolved (2012 Q3 release).
Andreas
Posted on: 14 May 2012 07:47
This Issue is not resolved in the current Version 2012_01 of the RadControls.