title: Reorder LayoutControlGroups inside another LayoutControlGroup on runtime
body: <p>I've got <code>LayoutControlGroup</code> with few other <code>LayoutControlGroup</code>s inside.</p>
  
  <p>What I need to do is to reorder them into specific order on runtime.</p>
  
  <p>For example, when form shows up I've got those groups in such order:</p>
  
  <pre><code>[Group0]
  [Group1]
  [Group2]
  [Group3]
  [Group4]
  </code></pre>
  
  <p>And then I get some data from DB and need to reorder groups according to that data, for example just reverse the order:</p>
  
  <pre><code>[Group4]
  [Group3]
  [Group2]
  [Group1]
  [Group0]
  </code></pre>
  
  <p>What I tried already:</p>
  
  <pre><code>List&lt;BaseLayoutItem&gt; currentOrder = lcgParentGroup.Items.Cast&lt;object&gt;().Where(c =&gt; c is BaseLayoutItem).Cast&lt;BaseLayoutItem&gt;().Where(c =&gt; c.Name.StartsWith("lcgInnerGroup") &amp;&amp; char.IsDigit(c.Name.Last())).ToList();
  currentOrder.Sort((x, y) =&gt; System.Collections.Comparer.Default.Compare(x.Location.Y, y.Location.Y));
  
  // Example order
  List&lt;BaseLayoutItem&gt; requiredOrder = new List&lt;BaseLayoutItem&gt;(currentOrder);
  requiredOrder.Reverse();
  
  for (int i = 1; i &lt; requiredOrder.Count; ++i)
  {
      // I just move every group after every relative group.
      BaseLayoutItem relative = lcgParentGroup.Items.FindByName(requiredOrder[i - 1].Name);
  
      DevExpress.XtraLayout.Customization.LayoutItemDragController dragController = new DevExpress.XtraLayout.Customization.LayoutItemDragController(requiredOrder[i], relative, MoveType.Outside, InsertLocation.After, LayoutType.Vertical);
      bool result = requiredOrder[i].Move(dragController);    
  }
  </code></pre>
  
  <p>However everytime the <code>result</code> is <code>false</code>.</p>
  
  <p>Is there any other way to do it?</p>