I have the following CellTemplate for a few columns in my RadGridView:
This is being applied correctly, but I need to access properties such as TextAlignment and DataFormatString that are set on the GridDataViewColumn for that cell. As you can see I've tried to access via the TemplatedParent, but to no avail. How can I access these properties, so I can use them within my template?
Thanks.
<
DataTemplate
x:Key
=
"TextCell"
DataType
=
"telerik:GridViewCell"
>
<
TextBlock
Text="{Binding Value,
RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type telerik:GridViewCell}}}"
TextAlignment="{Binding TextAlignment,
RelativeSource={RelativeSource TemplatedParent}}"
TextTrimming
=
"CharacterEllipsis"
TextWrapping
=
"NoWrap"
/>
</
DataTemplate
>
This is being applied correctly, but I need to access properties such as TextAlignment and DataFormatString that are set on the GridDataViewColumn for that cell. As you can see I've tried to access via the TemplatedParent, but to no avail. How can I access these properties, so I can use them within my template?
Thanks.