# C1.WPF.FlexGrid.C1FlexGrid.SaveColumnLayout

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_C1FlexGrid_SaveColumnLayout_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.SaveColumnLayout*">SaveColumnLayout Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_C1FlexGrid_SaveColumnLayout_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.SaveColumnLayout*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_SaveColumnLayout_System_Xml_XmlWriter_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.SaveColumnLayout(System.Xml.XmlWriter)">SaveColumnLayout(XmlWriter)</h4>
<div class="markdown level1 summary"><p>Saves the current column layout to an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.xmlwriter">XmlWriter</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveColumnLayout(XmlWriter xw)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SaveColumnLayout(xw As XmlWriter)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.xmlwriter">XmlWriter</a></td>
      <td><span class="parametername">xw</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.xmlwriter">XmlWriter</a> that will receive the current column layout information.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_SaveColumnLayout_System_Xml_XmlWriter__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;The column layout string defines the column positions, visibility, and width.
</code></pre>
<p>Invalid information in the column layout string is ignored.</p>
<p>This property can be used to persist column layouts defined by users so they
are preserved across sessions, and it can also be used to implement undo/redo
functionality in applications that allow users to modify the column layout.</p>
</div>
</div>
