Version

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. For help or questions on migrating your codebase to the XamDataGrid, please contact support.

Override Settings

Settings on xamGrid, such as sorting and filtering settings, are customizable on different levels of the control. For example, you can enable sorting on the entire control, but selectively disable sorting on specific columns. You can override settings of xamGrid™ by using settings on the column layout level or column level.

Every ColumnLayout object exposes properties that will override settings on the control level. For example, the ColumnLayout object contains an EditingSettings property of type EditingSettingOverride which overrides options set on the EditingSettings object on the xamGrid level.

Each column contains properties to override xamGrid or ColumnLayout settings. The properties are listed below:

The following code shows you how to allow editing only on child rows, and further restrict editing on a specific column in the child data.

In XAML:

<ig:XamGrid x:Name="xamGrid1" AutoGenerateColumns="False">
   <!-- Columns are ReadOnly by default -->
   <ig:XamGrid.Columns>
      <ig:TextColumn Key="CategoryName" />
      <ig:TextColumn Key="Description" />
   </ig:XamGrid.Columns>
   <ig:XamGrid.ColumnLayouts>
   <!-- Child Columns -->
      <ig:ColumnLayout Key="Products">
         <!-- Allow editing on child columns -->
         <ig:ColumnLayout.EditingSettings>
            <ig:EditingSettingsOverride AllowEditing="Row" />
         </ig:ColumnLayout.EditingSettings>
         <ig:ColumnLayout.Columns>
            <!-- Restrict editing on one of the columns -->
            <ig:TextColumn Key="ProductName" IsReadOnly="True"/>
            <ig:TextColumn Key="QuantityPerUnit" />
            <ig:TextColumn Key="UnitPrice" />
         </ig:ColumnLayout.Columns>
      </ig:ColumnLayout>
   </ig:XamGrid.ColumnLayouts>
</ig:XamGrid>

In Visual Basic:

Me.xamGrid1.ColumnLayouts(0).EditingSettings.AllowEditing = Infragistics.Controls.Grids.EditingType.Row
Dim productName As EditableColumn = TryCast(Me.xamGrid1.Columns.ColumnLayouts("Products").Columns("ProductName"), EditableColumn)
productName.IsReadOnly = True

In C#:

this.xamGrid1.ColumnLayouts[0].EditingSettings.AllowEditing = Infragistics.Controls.Grids.EditingType.Row;
EditableColumn productName = this.xamGrid1.Columns.ColumnLayouts["Products"].Columns["ProductName"] as EditableColumn;
productName.IsReadOnly = true;