Skip to main content
A newer version of this page is available. .

DataControlSerializationOptions.RemoveOldColumns Attached Property

Gets or sets whether the columns that exist in a layout when it is restored but do not currently exist in the grid, should be discarded. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.Core.dll

Declaration

Returns

Type Description
Boolean

true to discard the columns that exist in the layout being restored but do not currently exist in the grid; false to add these columns to the grid.

Remarks

The RemoveOldColumns option affects how the grid’s layout is restored. If it is set to true, the columns that exist in the layout being loaded, but do not exist in the grid, will not be re-created. Otherwise, these columns will be added to the grid.

To learn more, see Saving and Restoring Layout.

Example

This example shows how to save the grid layout to a memory stream. To do this, click the ‘Save Layout’ button. Once saved, the grid layout can then be restored by clicking the ‘Restore Layout’ button.

using System.Collections.Generic;
using System.Windows;
using System.Windows.Documents;

namespace DXGrid_GridLayout {
    public partial class Window1 : Window {
        public Window1() {
            InitializeComponent();
        }
    }
}
See Also