Question: I have a Xamdatagrid having hierarchical data.I want to display all such records expended automatically.So that user doesn't have to click on + icon for each record.

Answer: 
You can handle the XamDataGrid's InitializeRecord event (or override OnInitializeRecord) like so:

```
    void grid_InitializeRecord(object sender, Infragistics.Windows.DataPresenter.Events.InitializeRecordEventArgs e)
    {
        grid.ExecuteCommand(DataPresenterCommands.ToggleRecordIsExpanded, e.Record);
    }

```

There's also DataPresenterCommands.ExpandRecord, which expands the grid's ActiveRecord.
Here is the simpler solution that worked for me.

In the XAML:

```
<!-- namespace -->
xmlns:ig="http://schemas.infragistics.com/xaml/wpf"

<ig:XamDataGrid>
  <ig:XamDataGrid.FieldSettings>
    <ig:FieldSettings ExpandGroupByRecordsByDefault="True" />
  </ig:XamDataGrid.FieldSettings>
</ig:XamDataGrid>

```

However, note that the property name is "**GroupBy**Records", so maybe it doesn't work if your records are not grouped.