title: How to remove grouping at runtime of DevExpress GridControl in WPF from code behind?
body: <p>I have a GridControl which is binded by List using Entity. I am applying Grouping to Grid at runtime. I want to Remove/change grouping column at runtime from code behind is it possible in wpf?</p>
  
  <pre><code>&lt;dxg:GridControl Name="grdInfill"  Height="700" VerticalAlignment="Top" &gt;
          &lt;dxg:GridControl.Columns&gt;
              &lt;dxg:GridColumn FieldName="GlassType" AllowEditing="False"   /&gt;
              &lt;dxg:GridColumn FieldName="GlassDescription" GroupValueTemplate="{StaticResource descriptionHeader}"&gt;
                  &lt;!--GroupValueTemplate="{StaticResource descriptionHeader}"--&gt;
                  &lt;!--Header="GlassDescription" DisplayMemberBinding="{Binding Path=RowData.Row.GlassDescription, Mode=TwoWay}"--&gt;
              &lt;/dxg:GridColumn&gt;
              &lt;dxg:GridColumn FieldName="GlassType" AllowEditing="False" /&gt;
              &lt;dxg:GridColumn Name="qty" Header="Quantity" AllowEditing="False" DisplayMemberBinding="{Binding Path=RowData.Row.Quantity, Mode=TwoWay}" /&gt; &lt;!--FieldName="Quantity"--&gt;
              &lt;dxg:GridColumn FieldName="Width" AllowEditing="False" Header="Length"/&gt;
              &lt;dxg:GridColumn FieldName="Height" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="Elevation" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="Mark" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="GlassTag" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="WallLocation" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="SquareFoot" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="Weight" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="UnitCost" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="TotalCost" AllowEditing="False"/&gt;
              &lt;dxg:GridColumn FieldName="FuelSurcharge" AllowEditing="False"/&gt;
  
          &lt;/dxg:GridControl.Columns&gt;
          &lt;dxg:GridControl.View&gt;
              &lt;dxg:TableView ShowTotalSummary="True" AutoWidth="True" DetailHeaderContent="True"  ShowIndicator="False" ShowGroupPanel="False"&gt;&lt;!--GroupRowTemplate="{StaticResource descriptionHeader}"--&gt;
              &lt;/dxg:TableView&gt;
          &lt;/dxg:GridControl.View&gt;
      &lt;/dxg:GridControl&gt;
  
  protected void GetAllInfills()
          {
              List&lt;Infill&gt; infillList = new List&lt;Infill&gt;();
              infillList=BLL.GetAllInfills();
              if (infillList != null)
              {
                  grdInfill.ItemsSource = infillList;
  
                  grdInfill.GroupBy(grdInfill.Columns["GlassType"], ColumnSortOrder.Ascending);
                  grdInfill.GroupBy(grdInfill.Columns["GlassDescription"], ColumnSortOrder.Ascending);
  
                  grdInfill.AutoExpandAllGroups = true;
  
              }
          }
  </code></pre>
  
  <p>Now Clicking on Button i want to remove or change the grouping in WPF from code behind?</p>