<Grid>
   <Cfg id="RowTree" IdChars="0123456789" NumberId="1" NoVScroll="1" NoHScroll="1" SuppressCfg="1" RowIndex="Pos" Size="Small" ScrollParentHorz="Border"/>
   <Cfg MainCol="A" FullId="1"/>
   <LeftCols>
      <C Name="id" Type="Text" CanEdit="0" Width="60"/>
   </LeftCols>
   <Cols>
      <C Name="AChecked" Visible="0" CanExport="2" Type="Enum" EnumKeys="|0|1|2" Enum="||x|?" Width="30"/> <!-- for export to Excel only -->
      <C Name="A" Width="360" Icon="Check"/>
      <C Name="B" Width="60"/>
      <C Name="C" Width="60"/>
   </Cols>
   <Solid>
      <Topbar Cells="REV,ROOT,LINES,ICON" CanFocus="0"
         REVType="Bool" REVLabelRight="Reversed tree (MS Excel)" REVCanEdit="1"
         REVFormula="Grid.ReversedTree?1:0"
         REVOnChange="Grid.SetReversedTree(Value);"

         ROOTType="Bool" ROOTLabelRight="Hide root tree" ROOTCanEdit="1"
         ROOTFormula="Grid.HideRootTree?1:0"
         ROOTOnChange="Grid.HideRootTree = Value; Grid.RenderBody()"

         LINESType="Bool" LINESLabelRight="Hide tree lines" LINESCanEdit="1"
         LINESFormula="Grid.NoTreeLines?1:0"
         LINESOnChange="Grid.SetNoTreeLines(Value);"
         
         ICONType="Bool" ICONLabelRight="Hide custom checkbox" ICONCanEdit="1"
         ICONOnChange="Grid.Cols.A.Icon=Value?'':'Check';Grid.RenderBody();"
         
         />
   </Solid>
   <Header id="id" ALevels="1" AChecked=" "/>
   <Body>
      <B>
         <I id="1" A="Expanded" AChecked="2">
            <I id="1" A="Expanded" AChecked="1">
               <I id="1" A="Leaf" AChecked="1"/>
               <I id="2" A="Leaf" AChecked="1"/>
            </I>
            <I id="2" A="Leaf"/>
            <I id="3" Expanded="0" A="Collapsed">
               <I id="1" A="Collapsed" Expanded="0">
                  <I id="1" A="Leaf"/>
               </I>
               
               <I id="2" A="Expanded">
                  <I id="1" A="Leaf"/>
               </I>
            </I>
         </I>
         <I id="2" A="Always expanded" CanExpand="0">
            <I id="1" A="Collapsed" Expanded="0">
               <I id="1" A="Leaf"/>
            </I>
            <I id="2" A="Always expanded" CanExpand="0">
               <I id="1" A="Leaf"/>
            </I>
         </I>
         <I id="3" A="Tree in different column" CanExpand="2" BIcon="Expand" B="L1">
            <I id="1" A="Tree in different column" CanExpand="2" CButton="Expand" C="L2" Expanded="0">
               <I id="1" A="Leaf"/>
               <I id="2" A="Leaf"/>
            </I>
            <I id="2" A="L2" Expanded="0">
               <I id="1" A="Leaf"/>
            </I>
            <I id="3" A="Custom icon" Expanded="0" CanExpand="2" 
               BButton="Red.svg" BOnClickSide="Expand OR Collapse; Row.BButton=Row.Expanded?'Green.svg':'Red.svg'; Grid.RefreshCell(Row,Col); return 1;" BOnDblClickSide="1" B="L2"
               >
               <I id="1" A="Leaf"/>
            </I>
            <I id="4" A="More buttons for one tree (used API OnExpand)" Expanded="0" BButton="Expand" B="L2" CButton="Expand" C="L2">
               <I id="1" A="Leaf"/>
               <I id="2" A="Leaf"/>
            </I>
         </I>
         <I id="4" A="Expand on click to the whole row" ACanEdit="0" OnClick="Focus, Expand OR Collapse" Expanded="0">
            <I id="1" A="Leaf"/>
            <I id="2" A="Leaf"/>
         </I>
         <I id="5" A="Custom icon" TreeIcon2="Red.svg" TreeIcon3="Red.svg" TreeIcon4="Green.svg" TreeIcon5="Green.svg" Expanded="1">
            <I id="1" A="Custom icon always expanded" TreeIcon0="Yellow.svg" TreeIcon1="Yellow.svg" Expanded="1" CanExpand="0">
               <I id="1" A="Leaf"/>
            </I>
         </I>
         <I id="7" A="Expand on the same level" AButton="Expand" AExpandRows="8,9"/>
         <I id="8" A="Leaf" Visible="0"/>
         <I id="9" A="Expanded" Visible="0">
            <I id="1" A="Leaf"/>
         </I>
         <I id="10" A="Control different rows" BButton="Expand" BExpandRows="1,2" B="1,2" CButton="Expand" CExpandRows="3,4,5,6" C="3-6"/>
         <I id="11" A="Control its children" Expanded="1" AButton="Expand" AExpandRows="11$1" BButton="Expand" BExpandRows="11$2" B="2" CButton="Expand" CExpandRows="11$3,11$4" C="3,4">
            <I id="1" A="Shown by parent's A button" Visible="0"/>
            <I id="2" A="Shown by parent's B button"/>
            <I id="3" A="Shown by parent's C button" Visible="0"/>
            <I id="4" A="Shown by parent's C button" Visible="0"/>
         </I>
      </B>
   </Body>
</Grid>