I'm using RadGridView with a GridViewDataColumn defined with custom CellTemplate and CellEditTemplate defined. What I would like to do now is affect something defined in my DataTemplate for the CellTemplate based on whether it's row is selected or not.
More specifically in my example I have a DataTemplate that contains a TextBlock with TextTrimming and TextWrapping set up to show the text as a single line with character ellipsis when there is overflow. What I would like to do is display the text with TextWrapping turned on and without TextTrimming which I could do various ways if I can access the selection state of the parent row for that cell.
What's the best way for me to accomplish this with the RadGridView control? Is there an inherited attached property I can use or will a relative binding work. I would prefer doing this through a defined style with triggers on my TextBlock if possible to avoid writing value converters.
More specifically in my example I have a DataTemplate that contains a TextBlock with TextTrimming and TextWrapping set up to show the text as a single line with character ellipsis when there is overflow. What I would like to do is display the text with TextWrapping turned on and without TextTrimming which I could do various ways if I can access the selection state of the parent row for that cell.
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Note}"
TextWrapping
=
"NoWrap"
TextTrimming
=
"CharacterEllipsis"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
What's the best way for me to accomplish this with the RadGridView control? Is there an inherited attached property I can use or will a relative binding work. I would prefer doing this through a defined style with triggers on my TextBlock if possible to avoid writing value converters.