예제 #1
0
 public GridViewSummary(string col, string formatString, CustomSummaryOperation op, SummaryResultMethod getResult, GridViewGroup grp)
     : this(col, grp)
 {
     this._formatString = formatString;
     this._operation = SummaryOperation.Custom;
     this._customOperation = op;
     this._getSummaryMethod = getResult;
 }
예제 #2
0
 public GridViewSummary(string col, string formatString, SummaryOperation op, GridViewGroup grp)
     : this(col, grp)
 {
     this._formatString = formatString;
     this._operation = op;
     this._customOperation = null;
     this._getSummaryMethod = null;
 }
예제 #3
0
 private GridViewSummary(string col, GridViewGroup grp)
 {
     this._column = col;
     this._group = grp;
     this._value = null;
     this._quantity = 0;
     this._automatic = true;
     this._treatNullAsZero = false;
 }
예제 #4
0
    private void GenerateGroupSummary(GridViewGroup g, GridViewRow row)
    {
        int    colIndex;
        object colValue;

        if (!HasAutoSummary(g.Summaries) && !HasSuppressGroup())
        {
            return;
        }

        // Inserts a new row
        GridViewRow newRow = InsertGridRow(row, g);

        foreach (GridViewSummary s in g.Summaries)
        {
            if (s.Automatic)
            {
                colIndex = GetVisibleColumnIndex(s.Column);
                colIndex = ResolveCellIndex(newRow, colIndex);
                newRow.Cells[colIndex].Text = this.GetFormatedString(s.FormatString, this.GetColumnFormat(GetColumnIndex(s.Column)), s.Value);
            }
        }

        // If it is a suppress group must set the grouped values in the cells
        // of the inserted row
        if (g.IsSuppressGroup)
        {
            for (int i = 0; i < g.Columns.Length; i++)
            {
                colValue = g.ActualValues[i];
                if (colValue != null)
                {
                    colIndex = GetVisibleColumnIndex(g.Columns[i]);
                    colIndex = ResolveCellIndex(newRow, colIndex);
                    newRow.Cells[colIndex].Text = colValue.ToString();
                }
            }
        }

        // Triggers event GroupSummary
        if (GroupSummary != null)
        {
            GroupSummary(g.Name, g.ActualValues, newRow);
        }
    }
예제 #5
0
    public GridViewGroup SetSuppressGroup(string[] columns)
    {
        if (mGroups.Count > 0)
        {
            throw new Exception(ONE_GROUP_ALREADY_REGISTERED);
        }

        // TO DO: Perform column validation...
        GridViewGroup g = new GridViewGroup(columns, true, false, false, false);

        mGroups.Add(g);

        // Disable paging because pager works in datarows that
        // will be suppressed
        mGrid.AllowPaging = false;

        return(g);
    }
예제 #6
0
    protected void btnsearchArticulo_Click(object sender, EventArgs e)
    {
        var preciosGroupRepository = new PreciosGroupRepository();

        GridViewGroupFamily.SearchPanelFilter = "";
        GridViewArtículo.SearchPanelFilter    = "";
        GridViewGroup.FocusedRowIndex         = 0;
        GridViewGroup.DataSource = preciosGroupRepository.GetAllPreciosGroup();
        GridViewGroup.DataBind();
        GridViewGroup.Selection.SelectRow(0);
        GridViewGroup.MakeRowVisible(0);
        GridViewGroupFamily.FocusedRowIndex = 0;
        GridViewGroupFamily.DataSource      = FamiliasRepository.GetFamiliaByGroup();
        GridViewGroupFamily.DataBind();
        GridViewGroupFamily.MakeRowVisible(0);
        GridViewGroupFamily.Selection.SelectRow(0);
        GridViewArtículo.DataSource = ArticulosRepository.GetSelectedArticulos();
        GridViewArtículo.DataBind();
    }
예제 #7
0
    public GridViewSummary RegisterSummary(string column, string formatString, SummaryOperation operation, string groupName)
    {
        if (operation == SummaryOperation.Custom)
        {
            throw new Exception(USE_ADEQUATE_METHOD_TO_REGISTER_THE_SUMMARY);
        }

        GridViewGroup group = mGroups[groupName];

        if (group == null)
        {
            throw new Exception(String.Format(GROUP_NOT_FOUND, groupName));
        }

        GridViewSummary s = new GridViewSummary(column, formatString, operation, group);

        group.AddSummary(s);

        return(s);
    }
예제 #8
0
 protected void linkGroupphoto_Init(object sender, EventArgs e)
 {
     try
     {
         ((ASPxHyperLink)sender).Text = "Foto";
         GridViewDataItemTemplateContainer c = ((ASPxHyperLink)sender).NamingContainer as GridViewDataItemTemplateContainer;
         int rowIndex   = c.VisibleIndex;
         var editorAuto = 0;
         int.TryParse(Convert.ToString(GridViewGroup.GetRowValues(rowIndex, "AutoEditor")), out editorAuto);
         if (editorAuto > 0)
         {
             var articulosHTML = ArticulosRepository.GetArticulosHTML(editorAuto);
             if (articulosHTML.Any())
             {
                 ((ASPxHyperLink)sender).ClientSideEvents.Click = "function(s,e){  e.processOnServer = false; showHTMLEditor('" + editorAuto + "'); return false;}";
             }
             else
             {
                 ((ASPxHyperLink)sender).Enabled       = false;
                 ((ASPxHyperLink)sender).ClientEnabled = false;
                 ((ASPxHyperLink)sender).Text          = "-";
                 ((ASPxHyperLink)sender).CssClass     += " hidehovercursor";
             }
         }
         else
         {
             ((ASPxHyperLink)sender).Enabled       = false;
             ((ASPxHyperLink)sender).ClientEnabled = false;
             ((ASPxHyperLink)sender).Text          = "-";
             ((ASPxHyperLink)sender).CssClass     += " hidehovercursor";
         }
     }
     catch (Exception ex)
     {
         ((ASPxHyperLink)sender).Enabled       = false;
         ((ASPxHyperLink)sender).ClientEnabled = false;
         ((ASPxHyperLink)sender).Text          = "-";
         ((ASPxHyperLink)sender).CssClass     += " hidehovercursor";
     }
 }
예제 #9
0
    private bool ColumnHasSummary(string column, GridViewGroup g)
    {
        List <GridViewSummary> list;

        if (g == null)
        {
            list = this.mGeneralSummaries;
        }
        else
        {
            list = g.Summaries;
        }

        foreach (GridViewSummary s in list)
        {
            if (column.ToLower() == s.Column.ToLower())
            {
                return(true);
            }
        }
        return(false);
    }
예제 #10
0
    private bool ColumnHasSummary(int colindex, GridViewGroup g)
    {
        List <GridViewSummary> list;
        string column = this.GetDataFieldName(mGrid.Columns[colindex]);

        if (g == null)
        {
            list = this.mGeneralSummaries;
        }
        else
        {
            list = g.Summaries;
        }

        foreach (GridViewSummary s in list)
        {
            if (column.ToLower() == s.Column.ToLower())
            {
                return(true);
            }
        }
        return(false);
    }
예제 #11
0
    /// <summary>
    /// Inserts a grid row. Only cells required for the summary results
    /// will be created (except if GenerateAllCellsOnSummaryRow is true).
    /// The group will be checked for columns with summary
    /// </summary>
    /// <param name="beforeRow"></param>
    /// <param name="g"></param>
    /// <returns></returns>
    private GridViewRow InsertGridRow(GridViewRow beforeRow, GridViewGroup g)
    {
        int       colspan;
        TableCell cell;

        TableCell[] tcArray;
        int         visibleColumns = this.GetVisibleColumnCount();

        Table       tbl         = (Table)mGrid.Controls[0];
        int         newRowIndex = tbl.Rows.GetRowIndex(beforeRow);
        GridViewRow newRow      = new GridViewRow(newRowIndex, newRowIndex, DataControlRowType.DataRow, DataControlRowState.Normal);

        if (g != null && (g.IsSuppressGroup || g.GenerateAllCellsOnSummaryRow))
        {
            // Create all the table cells
            tcArray = new TableCell[visibleColumns];
            for (int i = 0; i < visibleColumns; i++)
            {
                cell = new TableCell();
                cell.ApplyStyle(mGrid.Columns[GetRealIndexFromVisibleColumnIndex(i)].ItemStyle);
                cell.Text  = "&nbsp;";
                tcArray[i] = cell;
            }
        }
        else
        {
            // Create only the required table cells
            colspan = 0;
            List <TableCell> tcc = new List <TableCell>();
            for (int i = 0; i < mGrid.Columns.Count; i++)
            {
                if (ColumnHasSummary(i, g))
                {
                    if (colspan > 0)
                    {
                        cell            = new TableCell();
                        cell.Text       = "&nbsp;";
                        cell.ColumnSpan = colspan;
                        tcc.Add(cell);
                        colspan = 0;
                    }

                    // insert table cell and copy the style
                    cell = new TableCell();
                    cell.ApplyStyle(mGrid.Columns[i].ItemStyle);
                    tcc.Add(cell);
                }
                else if (mGrid.Columns[i].Visible)
                {
                    // A visible column that will have no cell because has
                    // no summary. So we increase the colspan...
                    colspan++;
                }
            }

            if (colspan > 0)
            {
                cell            = new TableCell();
                cell.Text       = "&nbsp;";
                cell.ColumnSpan = colspan;
                tcc.Add(cell);
                colspan = 0;
            }

            tcArray = new TableCell[tcc.Count];
            tcc.CopyTo(tcArray);
        }

        newRow.Cells.AddRange(tcArray);
        tbl.Controls.AddAt(newRowIndex, newRow);

        return(newRow);
    }
예제 #12
0
    /// <summary>
    /// Inserta una fila de la cuadrícula. Solo se requieren celdas para los resultados del resumen.
    /// se creará(excepto si GenerateAllCellsOnSummaryRow es verdadero).
    /// El grupo será revisado por columnas con resumen
    /// </summary>
    /// <param name="beforeRow"></param>
    /// <param name="g"></param>
    /// <returns></returns>
    private GridViewRow InsertGridRow(GridViewRow beforeRow, GridViewGroup g)
    {
        int       colspan;
        TableCell cell;

        TableCell[] tcArray;
        int         visibleColumns = this.GetVisibleColumnCount();

        Table       tbl         = (Table)mGrid.Controls[0];
        int         newRowIndex = tbl.Rows.GetRowIndex(beforeRow);
        GridViewRow newRow      = new GridViewRow(newRowIndex, newRowIndex, DataControlRowType.DataRow, DataControlRowState.Normal);

        if (g != null && (g.IsSuppressGroup || g.GenerateAllCellsOnSummaryRow))
        {
            tcArray = new TableCell[visibleColumns];
            for (int i = 0; i < visibleColumns; i++)
            {
                cell = new TableCell();
                cell.ApplyStyle(mGrid.Columns[GetRealIndexFromVisibleColumnIndex(i)].ItemStyle);
                cell.Text  = "&nbsp;";
                tcArray[i] = cell;
            }
        }
        else
        {
            colspan = 0;
            List <TableCell> tcc = new List <TableCell>();
            for (int i = 0; i < mGrid.Columns.Count; i++)
            {
                if (ColumnHasSummary(i, g))
                {
                    if (colspan > 0)
                    {
                        cell            = new TableCell();
                        cell.Text       = "&nbsp;";
                        cell.ColumnSpan = colspan;
                        tcc.Add(cell);
                        colspan = 0;
                    }

                    // Inserta celda de tabla y copia el estilo.
                    cell = new TableCell();
                    cell.ApplyStyle(mGrid.Columns[i].ItemStyle);
                    tcc.Add(cell);
                }
                else if (mGrid.Columns[i].Visible)
                {
                    // Si la columna es visible, aumentamos el colspan
                    colspan++;
                }
            }

            if (colspan > 0)
            {
                cell            = new TableCell();
                cell.Text       = "&nbsp;";
                cell.ColumnSpan = colspan;
                tcc.Add(cell);
                colspan = 0;
            }

            tcArray = new TableCell[tcc.Count];
            tcc.CopyTo(tcArray);
        }

        newRow.Cells.AddRange(tcArray);
        tbl.Controls.AddAt(newRowIndex, newRow);

        return(newRow);
    }
예제 #13
0
    private void ProcessGroup(GridViewGroup g, GridViewRowEventArgs e)
    {
        string groupHeaderText = String.Empty;

        // Check if it's still in the same group values
        if (!EvaluateEquals(g, e.Row.DataItem))
        {
            // Check if a group ends or if it is the first group values starting...
            if (g.ActualValues != null )
            {
                g.CalculateSummaries();
                GenerateGroupSummary(g, e.Row);

                // Triggers event GroupEnd
                if (GroupEnd != null)
                {
                    GroupEnd(g.Name, g.ActualValues, e.Row);
                }
            }

            // Another group values starts now
            g.Reset();
            g.SetActualValues( GetGroupRowValues(g, e.Row.DataItem) );

            // If group is automatic inserts a group header
            if (g.Automatic)
            {
                for (int v = 0; v < g.ActualValues.Length; v++)
                {
                    if (g.ActualValues[v] == null) continue;
                    groupHeaderText += g.ActualValues[v].ToString();
                    if (g.ActualValues.Length - v > 1)
                    {
                        groupHeaderText += " - ";
                    }
                }

                GridViewRow newRow = InsertGridRow(e.Row);
                newRow.Cells[0].Text = groupHeaderText;

                // Triggers event GroupHeader
                if (GroupHeader != null)
                {
                    GroupHeader(g.Name, g.ActualValues, newRow);
                }
            }

            // Triggers event GroupStart
            if (GroupStart != null)
            {
                GroupStart(g.Name, g.ActualValues, e.Row);
            }
        }

        g.AddValueToSummaries(e.Row.DataItem);
    }
예제 #14
0
    /// <summary>
    /// Inserts a grid row. Only cells required for the summary results
    /// will be created (except if GenerateAllCellsOnSummaryRow is true).
    /// The group will be checked for columns with summary
    /// </summary>
    /// <param name="beforeRow"></param>
    /// <param name="g"></param>
    /// <returns></returns>
    private GridViewRow InsertGridRow(GridViewRow beforeRow, GridViewGroup g)
    {
        int colspan;
        TableCell cell;
        TableCell[] tcArray;
        int visibleColumns = this.GetVisibleColumnCount();

        Table tbl = (Table)mGrid.Controls[0];
        int newRowIndex = tbl.Rows.GetRowIndex(beforeRow);
        GridViewRow newRow = new GridViewRow(newRowIndex, newRowIndex, DataControlRowType.DataRow, DataControlRowState.Normal);

        if ( g != null && ( g.IsSuppressGroup || g.GenerateAllCellsOnSummaryRow ) )
        {
            // Create all the table cells
            tcArray = new TableCell[visibleColumns];
            for (int i = 0; i < visibleColumns; i++)
            {
                cell = new TableCell();
                cell.ApplyStyle(mGrid.Columns[GetRealIndexFromVisibleColumnIndex(i)].ItemStyle);
                cell.Text = "&nbsp;";
                tcArray[i] = cell;
            }
        }
        else
        {
            // Create only the required table cells
            colspan = 0;
            List<TableCell> tcc = new List<TableCell>();
            for (int i = 0; i < mGrid.Columns.Count; i++)
            {
                if (ColumnHasSummary(i, g))
                {
                    if (colspan > 0)
                    {
                        cell = new TableCell();
                        cell.Text = "&nbsp;";
                        cell.ColumnSpan = colspan;
                        tcc.Add(cell);
                        colspan = 0;
                    }

                    // insert table cell and copy the style
                    cell = new TableCell();
                    cell.ApplyStyle(mGrid.Columns[i].ItemStyle);
                    tcc.Add(cell);
                }
                else if (mGrid.Columns[i].Visible)
                {
                    // A visible column that will have no cell because has
                    // no summary. So we increase the colspan...
                    colspan++;
                }
            }

            if (colspan > 0)
            {
                cell = new TableCell();
                cell.Text = "&nbsp;";
                cell.ColumnSpan = colspan;
                tcc.Add(cell);
                colspan = 0;
            }

            tcArray = new TableCell[tcc.Count];
            tcc.CopyTo(tcArray);
        }

        newRow.Cells.AddRange(tcArray);
        tbl.Controls.AddAt(newRowIndex, newRow);

        return newRow;
    }
예제 #15
0
    private object[] GetGroupRowValues(GridViewGroup g, object dataitem)
    {
        object[] values = new object[g.Columns.Length];

        for (int i = 0; i < g.Columns.Length; i++)
        {
            values[i] = DataBinder.Eval(dataitem, g.Columns[i]);
        }

        return values;
    }
예제 #16
0
    private void GenerateGroupSummary(GridViewGroup g, GridViewRow row)
    {
        int colIndex;
        object colValue;

        if ( ! HasAutoSummary(g.Summaries) && ! HasSuppressGroup() ) return;

        // Inserts a new row
        GridViewRow newRow = InsertGridRow(row, g);

        foreach (GridViewSummary s in g.Summaries)
        {
            if (s.Automatic)
            {
                colIndex = GetVisibleColumnIndex(s.Column);
                colIndex = ResolveCellIndex(newRow, colIndex);
                newRow.Cells[colIndex].Text = this.GetFormatedString(s.FormatString, this.GetColumnFormat(GetColumnIndex(s.Column)), s.Value);
            }
        }

        // If it is a suppress group must set the grouped values in the cells
        // of the inserted row
        if (g.IsSuppressGroup)
        {
            for (int i = 0; i < g.Columns.Length; i++ )
            {
                colValue = g.ActualValues[i];
                if ( colValue != null )
                {
                    colIndex = GetVisibleColumnIndex(g.Columns[i]);
                    colIndex = ResolveCellIndex(newRow, colIndex);
                    newRow.Cells[colIndex].Text = colValue.ToString();
                }
            }
        }

        // Triggers event GroupSummary
        if (GroupSummary != null)
        {
            GroupSummary(g.Name, g.ActualValues, newRow);
        }
    }
예제 #17
0
    /// <summary>
    /// Compares the actual group values with the values of the current dataitem
    /// </summary>
    /// <param name="g"></param>
    /// <param name="dataitem"></param>
    /// <returns></returns>
    private bool EvaluateEquals(GridViewGroup g, object dataitem)
    {
        // The values wasn't initialized
        if (g.ActualValues == null) return false;

        for (int i = 0; i < g.Columns.Length; i++)
        {
            if (g.ActualValues[i] == null && DataBinder.Eval(dataitem, g.Columns[i]) != null) return false;
            if (g.ActualValues[i] != null && DataBinder.Eval(dataitem, g.Columns[i]) == null) return false;
            if (!g.ActualValues[i].Equals(DataBinder.Eval(dataitem, g.Columns[i]))) return false;
        }

        return true;
    }
예제 #18
0
    private bool ColumnHasSummary(string column, GridViewGroup g)
    {
        List<GridViewSummary> list;

        if (g == null)
            list = this.mGeneralSummaries;
        else
            list = g.Summaries;

        foreach (GridViewSummary s in list)
        {
            if (column.ToLower() == s.Column.ToLower())
            {
                return true;
            }
        }
        return false;
    }
예제 #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["User"] == null)
        {
            if (Page.IsCallback)
            {
                ASPxWebControl.RedirectOnCallback("/Account/login.aspx");
            }
            else
            {
                Response.Redirect("/Account/login.aspx");
            }
        }
        Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function () { SetSize();});", true);

        var preciosGroupRepository = new PreciosGroupRepository();
        int grupo     = 0;
        int familiaId = 0;

        if (!Page.IsPostBack)
        {
            Session["SelectedArticle"] = null;
            if (!string.IsNullOrEmpty(Request.QueryString["sp"]))
            {
                var articulosList = ArticulosRepository.GetAllArticuloDetail(Request.QueryString["sp"]);
                foreach (var articulos in articulosList)
                {
                    if (articulos.Dto == -1)
                    {
                        articulos.Dto = 0;
                    }

                    articulos.Neto       = CommonFunction.Redondear(articulos.Precio - (articulos.Precio * articulos.Dto / 100), 2);
                    articulos.PrecioIgic = CommonFunction.Redondear(articulos.Precio + (articulos.Precio * articulos.PercenImpuesto / 100), 2);
                    articulos.NetoIgic   = CommonFunction.Redondear(articulos.Neto + (articulos.Neto * articulos.PercenImpuesto / 100), 2);
                }

                Session["SelectedArticle"]           = articulosList;
                GridViewPresupuestoActual.DataSource = articulosList;
                GridViewPresupuestoActual.DataBind();
            }
            pcHTMLEditor.ShowOnPageLoad = false;
        }

        GridViewGroup.DataSource = preciosGroupRepository.GetAllPreciosGroup();
        GridViewGroup.DataBind();

        if (GridViewGroup.FocusedRowIndex > 0 && GridViewGroup.GetSelectedFieldValues("Grupo").Count > 0)
        {
            grupo = (int)GridViewGroup.GetSelectedFieldValues("Grupo").Select(c => c).FirstOrDefault();
        }

        GridViewGroupFamily.DataSource = FamiliasRepository.GetFamiliaByGroup(grupo);
        GridViewGroupFamily.DataBind();

        //if (GridViewGroupFamily.FocusedRowIndex > -1 && GridViewGroupFamily.GetSelectedFieldValues("Autofamilia").Count > 0)
        if (GridViewGroupFamily.FocusedRowIndex > -1 && GridViewGroupFamily.GetRow(GridViewGroupFamily.FocusedRowIndex) != null)
        {
            var rowLvalue = (Familias)GridViewGroupFamily.GetRow(GridViewGroupFamily.FocusedRowIndex);
            familiaId = rowLvalue.Autofamilia;
        }
        GridViewArtículo.DataSource = ArticulosRepository.GetSelectedArticulos(FamiliaId: familiaId);
        GridViewArtículo.DataBind();
    }
예제 #20
0
 public GridViewSummary(string col, CustomSummaryOperation op, SummaryResultMethod getResult, GridViewGroup grp)
     : this(col, String.Empty, op, getResult, grp)
 {
 }
예제 #21
0
 public GridViewSummary(string col, SummaryOperation op, GridViewGroup grp)
     : this(col, String.Empty, op, grp)
 {
 }
예제 #22
0
 public GridViewSummary(string col, CustomSummaryOperation op, SummaryResultMethod getResult, GridViewGroup grp)
     : this(col, String.Empty, op, getResult, grp)
 {
 }
예제 #23
0
 internal void SetGroup(GridViewGroup g)
 {
     this._group = g;
 }
예제 #24
0
 public GridViewSummary(string col, SummaryOperation op, GridViewGroup grp)
     : this(col, String.Empty, op, grp)
 {
 }
예제 #25
0
    public GridViewGroup RegisterGroup(string[] columns, bool auto, bool hideGroupColumns)
    {
        if ( HasSuppressGroup() )
        {
            throw new Exception(SUPPRESS_GROUP_ALREADY_DEFINED);
        }

        // TO DO: Perform column validation...
        GridViewGroup g = new GridViewGroup(columns, auto, hideGroupColumns);
        mGroups.Add(g);

        if (hideGroupColumns)
        {
            for (int i = 0; i < mGrid.Columns.Count; i++)
            {

                for (int j = 0; j < columns.Length; j++)
                {

                    if (GetDataFieldName(mGrid.Columns[i]).ToLower() == columns[j].ToLower())
                    {
                        mGrid.Columns[i].Visible = true;
                    }
                }
            }
        }

        return g;
    }
예제 #26
0
    public GridViewGroup SetSuppressGroup(string[] columns)
    {
        if (mGroups.Count > 0)
        {
            throw new Exception(ONE_GROUP_ALREADY_REGISTERED);
        }

        // TO DO: Perform column validation...
        GridViewGroup g = new GridViewGroup(columns, true, false, false, false);
        mGroups.Add(g);

        // Disable paging because pager works in datarows that
        // will be suppressed
        mGrid.AllowPaging = false;

        return g;
    }
예제 #27
0
 public GridViewSummary(string col, string formatString, CustomSummaryOperation op, SummaryResultMethod getResult, GridViewGroup grp)
     : this(col, grp)
 {
     this._formatString     = formatString;
     this._operation        = SummaryOperation.Custom;
     this._customOperation  = op;
     this._getSummaryMethod = getResult;
 }
예제 #28
0
    private bool ColumnHasSummary(int colindex, GridViewGroup g)
    {
        List<GridViewSummary> list;
        string column = this.GetDataFieldName(mGrid.Columns[colindex]);

        if (g == null)
            list = this.mGeneralSummaries;
        else
            list = g.Summaries;

        foreach (GridViewSummary s in list)
        {
            if (column.ToLower() == s.Column.ToLower())
            {
                return true;
            }
        }
        return false;
    }
예제 #29
0
 internal void SetGroup(GridViewGroup g)
 {
     this._group = g;
 }
 protected void gvMenu_DataBinding(object sender, EventArgs e)
 {
     GridViewGroup First = new GridViewGroup(grdReports, null, "OverHeadAccount|");
 }