/******************************************************************/

    protected void btnAdvanced_Click(object sender, EventArgs e)
    {
        if (btnAdvanced.Text.Equals("Expand"))
        {
            mode                = "Advanced";
            btnAdvanced.Text    = "Hide Optional Parameters";
            lblAdvanced         = pnlMainGrid.FindControl("lblAdvancedMode") as Label;
            lblAdvanced.ToolTip = "compress additional columns";
            lblAdvanced.Text    = "<i class='fas fa-eye-slash fa-fw row-icon'></i><span>SHOW/HIDE</span>";
        }
        else
        {
            mode                = "Standard";
            btnAdvanced.Text    = "Expand";
            lblAdvanced         = pnlMainGrid.FindControl("lblAdvancedMode") as Label;
            lblAdvanced.ToolTip = "expand additional columns";
            lblAdvanced.Text    = "<i class='fas fa-eye-slash fa-fw-slash row-icon'></i><span>SHOW/HIDE</span>";
        }

        for (int i = 0; i < FIELDS.Length; i++)
        {
            if (ADVANCED_FIELDS[i])
            {
                grid.Columns[i].Visible = !grid.Columns[i].Visible;
            }
        }

        if (PAGENAME.Equals("/input/products/bom.aspx"))
        {
            CheckBox myCheck = pnlMainGrid.FindControl("checkAllSubComponents") as CheckBox;
            myCheck.Checked = !myCheck.Checked;
        }
        this.SetData();
    }
 protected void grid_RowUpdating(object sender, GridViewUpdateEventArgs e)
 {
     if (PAGENAME.Equals("labor.aspx") || PAGENAME.Equals("whatif_labor.aspx"))
     {
         RowUpdate(e.RowIndex);
         SyncTables();
         SetModelModified(true, false);
     }
 }