Hi,
We upgraded from 11.2 to 14.2 recently. We have a xamDataGrid where there are some columns that are added dynamically in the code behind. In 11.2, I needed to add the follow style in order to add padding and ellipsis to the cell (see works.jpg):
<Style TargetType="{x:Type editors:XamTextEditor}"> <Setter Property="Padding" Value="4,0,4,0"/> </Style>
<Style TargetType="{x:Type igEditors:XamTextEditor}"> <Style.Resources> <Style TargetType="{x:Type igWindows:SimpleTextBlock}"> <Setter Property="TextTrimming" Value="CharacterEllipsis"/> <Setter Property="ToolTip" Value="{Binding Path=Value, RelativeSource={RelativeSource AncestorType=igEditors:XamTextEditor}}"/> </Style> </Style.Resources> </Style>
After upgrading to 14.2, the padding and ellipsis is no longer there (see broken.jpg). Any idea what I need to do to fix it?
Thanks,
Harold
I can't seem to attach multiple files...so here's the broken.jpg screenshot.
Hi Harold,
I have been looking into your issue and everything seems to work on my side. I am attaching a sample application(DataGridTextEditorValue.zip) that shows hot the editors behave.
Please let me know, if I am missing something.
Hi Yanko,
Thanks for the quick reply. One thing I forgot to mention is that I'm using Field with AlternateBinding. If I change the sample to use AlternateBinding, then the style doesn't work anymore. Attached is the modified sample. I've also modified the sample to include tooltip and ellipsis.
Hello Harold,
I have logged this behavior with our developers in our tracking system, with an issue ID of 190415. I have also created a support ticket on your behalf with number CAS-152548-R1D1S9 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
Thanks Yanko!
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads.
Thanks Andrew! It works!
Thanks Andrew!! I'm on vacation this week. Will give it a try when I'm back to work on Monday.
You can work around the issue by explicitly setting the DataType of the Field to be string.
e.g.
DataType="{x:Type sys:String}" xmlns:sys="clr-namespace:System;assembly=mscorlib"
The issue was that for UnboundField the DataType property defaults to string whereas for Field it defaults to Object. The fix made was just to use string for field's that are "unbound" (i.e. the BindingType is not UseNameBinding).
Unfortunately, I can't install the service release because that will require the whole company to upgrade and redistribute. I'll see if I can change it to a Binding Field instead of AlternateBinding.