/// <summary> /// remove all groupings from aspxdatagrid /// </summary> /// public static void remove_dxgrid_grouping(DevExpress.Web.ASPxGridView.ASPxGridView grid) { try { for (int i = 0; i < grid.Columns.Count; i++) if (grid.Columns[i] is DevExpress.Web.ASPxGridView.GridViewDataColumn) { DevExpress.Web.ASPxGridView.GridViewDataColumn _gridViewDataColumn = (DevExpress.Web.ASPxGridView.GridViewDataColumn)grid.Columns[i]; if (_gridViewDataColumn.GroupIndex > -1) grid.UnGroup(_gridViewDataColumn); } } catch (Exception ex) { string _result = ex.Message.ToString(); //Response.Write(ex.Message.ToString()); //this.lblmsgboxdiv.Text += "<div class='alert'>Error description" + ": " + ex.Message.ToString() + "</div>"; } }