title: Get the all the children from a Sitecore item in a parent-child relation
body: <p>The following code should return all the children and sub-children in a list, but it's not keeping the ordering of parent-child relation. It returns all the parent items first, and then all the child items. </p>
  
  <p>Is it possible somehow to keep the items in order, and get them in a list in the same order as they are in Sitecore?</p>
  
  <p><code>MainItem</code> contains the items in the parent-child relation:</p>
  
  <pre class="lang-csharp prettyprint-override"><code>Item mainItem= Sitecore.Context.Database.GetItem(Settings.GetSetting("MainItem"));
  mainItem.Axes.GetDescendants().ToList();
  </code></pre>