I am using below code. But ... applied to Column header instead of apply to cell content of column. I want to apply it Text.
<igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowResize="True" AllowEdit="False" CellClickAction="SelectRecord" ExpandableFieldRecordHeaderDisplayMode="NeverDisplayHeader" ExpandableFieldRecordExpansionMode="ShowExpansionIndicatorIfSiblingsExist" LabelClickAction="SortByMultipleFields" LabelTextAlignment="Center" LabelTextTrimming="CharacterEllipsis" LabelTextWrapping="NoWrap" /> </igDP:XamDataGrid.FieldSettings>
Can anyone will guide on this?
Hello,
Thank you for your post. I have been looking into the functionality that you are trying to achieve and in order to allow TextTrimming to the Cells in the XamDataGrid, you can set the trimming to the editors that are used in the cells. The LabelTextTrimming property of the FieldSettings, sets the text trimming of the LabelPresenter of the Field that has this FieldSettings object. You can see detailed information regarding the LabelTextTrimminf property here in our documentation: http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v12.1~Infragistics.Windows.DataPresenter.FieldSettings~LabelTextTrimming.html I have created a sample application for you that demonstrates how you can enable the TextTriming of the XamTextEditor, which is used by default, for all properties of type string in the data bound to the XamDataGrid. The sample application uses an approach, where the Template property of the editor is modified and the TextTrimming of the SimpleTextBlock is set. Another approach is to create a style for the XamTextEditor and in the Resources of the Style to add a Style for the SimpleTextBlock as follow:
... xmlns:igWindows="http://infragistics.com/Windows" ... <Style TargetType="{x:Type igEditor:XamTextEditor}"> <Style.Resources> <Style TargetType="{x:Type igWindows:SimpleTextBlock}"> <Setter Property="TextTrimming" Value="CharacterEllipsis"/> </Style> </Style.Resources> </Style>
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Is it possible to do this with the xamMaskedEditor? We have numeric fields with formatting and it is important that if the column is too narrow to not truncate and show confusing values but instead show the ellipsis to indicate there is more there.
I am just checking if you require any further assistance on the matter.