Hello Tony,
I am afraid that we had to close this issue, as we did not find an appropriate fix after researching it extensively. I am posting a comment by the colleague, who worked on the issue:
"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."
Please, let us know if the suggested workaround works for you.
Regards,
Ivan Ivanov
Telerik
I am afraid that we had to close this issue, as we did not find an appropriate fix after researching it extensively. I am posting a comment by the colleague, who worked on the issue:
"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."
Please, let us know if the suggested workaround works for you.
Regards,
Ivan Ivanov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items