Version

ExpansionIndicatorDisplayMode Property

Determines whether an expansion indicator is displayed in each Record.
Syntax
'Declaration
 
Public Property ExpansionIndicatorDisplayMode As ExpansionIndicatorDisplayMode
public ExpansionIndicatorDisplayMode ExpansionIndicatorDisplayMode {get; set;}
Remarks

This setting is used in the Record's Record.ExpansionIndicatorVisibility get accessor to determine the resolved visiblity of the expansion indicator. However, explicitly setting the Record.ExpansionIndicatorVisibility property on the Record will take precedence over this property.

Note: this property is ignored in certain views where expansion indicators are not supported. It is also ignored if the IsNestedDataDisplayEnabled property is set to false.

Example
The following snippet shows how to specify that records will be checked as soon as they are displayed to see if they have any child records. If no child records exist then the expansion indicators will not be shown. Depending on the data source this may cause some additional overhead. That is why the default is resolved to 'CheckOnExpand'.

public partial class Window1 : Window
{
    public Window1()
    {
        InitializeComponent();

        // Set the ExpansionIndicatorDisplayMode so that when a record
        // is displayed it will be checked to see if it has any child records.
        // The expansion indicator will only be displayed if the record has 
  // children.

        this.XamDataGrid1.FieldLayoutSettings.ExpansionIndicatorDisplayMode 
            = ExpansionIndicatorDisplayMode.CheckOnDisplay;

    }
}
<Window x:Class="Snippet_app_1.Window1"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
xmlns:igDP="http://infragistics.com/DataPresenter"
    
xmlns:igEditors="http://infragistics.com/Editors"
    
xmlns:igWindows="http://infragistics.com/Windows"
    
xmlns:igThemes="http://infragistics.com/Themes"
    
Title="Window1" Height="300" Width="300">
    
<Grid>
        
<igDP:XamDataGrid x:Name="XamDataGrid1"
                        
DataSource="{Binding Source={StaticResource OrdersDataSource}, XPath=Order}">

            
<!-- These settings become the default for all FieldLayouts -->
            
<igDP:XamDataGrid.FieldLayoutSettings>
                
<!-- Set the ExpansionIndicatorDisplayMode so that when a record
                     is displayed it will be checked to see if it has any child
                     records. The expansions indicator will only be displayed 
                     if the record has children. 
-->
                
<igDP:FieldLayoutSettings ExpansionIndicatorDisplayMode="CheckOnDisplay"/>
            
</igDP:XamDataGrid.FieldLayoutSettings>
        
</igDP:XamDataGrid>

    
</Grid>
</Window>
Imports Infragistics.Windows.DataPresenter

Class Window1

    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Set the ExpansionIndicatorDisplayMode so the when a 
        ' Record is displayed it wil be checked for any children
        ' an the expansions indicator will only be displayed 
        ' if the record has children
        Me.XamDataGrid1.FieldLayoutSettings.ExpansionIndicatorDisplayMode = ExpansionIndicatorDisplayMode.CheckOnDisplay

    End Sub
End Class
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also