protected void AddBondingCompaniesCostsNewEmptyFix(GridView grdBondingCompaniesCostsByClientProject)
        {
            if (grdBondingCompaniesCostsByClientProject.Rows.Count == 0)
            {
                int companyId = Int32.Parse(hdfCompanyId.Value);
                ActualCostsAddTDS.BondingCompaniesCostsDataTable dt = new ActualCostsAddTDS.BondingCompaniesCostsDataTable();
                dt.AddBondingCompaniesCostsRow(-1, -1, DateTime.Now, -1, -1, "", false, companyId, false, "", 0, "", "", 1);
                Session["bondingCompaniesCostsByClientProjectDummy"] = dt;

                grdBondingCompaniesCostsByClientProject.DataBind();
            }

            // normally executes at all postbacks
            if (grdBondingCompaniesCostsByClientProject.Rows.Count == 1)
            {
                ActualCostsAddTDS.BondingCompaniesCostsDataTable dt = (ActualCostsAddTDS.BondingCompaniesCostsDataTable)Session["bondingCompaniesCostsByClientProjectDummy"];
                if (dt != null)
                {
                    grdBondingCompaniesCostsByClientProject.Rows[0].Visible = false;
                    grdBondingCompaniesCostsByClientProject.Rows[0].Controls.Clear();
                }
            }
        }