Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Adding "..." in the cell value if length is more than cell width.
posted

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?

Parents
No Data
Reply
  • 30945
    Suggested Answer
    Offline posted

    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

    CellTextTrimming.zip
Children