protected void grPackageList_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        GridView _gridView = (GridView)sender;
        // Get the selected index and the command name
        int    _selectedIndex = int.Parse(e.CommandArgument.ToString());
        string _commandName   = e.CommandName;

        _gridView.SelectedIndex = _selectedIndex;
        switch (_commandName)
        {
        case ("RowEdit"):
            //Payroll_MasterMgr objSalaryManager2 = new Payroll_MasterMgr();
            hfID.Value          = grPackageList.DataKeys[_gridView.SelectedIndex].Values[0].ToString();
            txtHeadTitle.Text   = grPackageList.SelectedRow.Cells[1].Text.Trim();
            txtDescription.Text = grPackageList.SelectedRow.Cells[2].Text.Trim();
            chkInActive.Checked = grPackageList.SelectedRow.Cells[3].Text.Trim() == "Y"?false:true;

            // Display the Details Value

            DataTable dtBenfHeadDetails = objSalaryHead.SelectBenefitPakDetls(Convert.ToInt32(hfID.Value));
            grBenefitHeads.DataSource = dtBenfHeadDetails;
            grBenefitHeads.DataBind();
            foreach (GridViewRow gRow in grBenefitHeads.Rows)
            {
                gRow.Cells[5].Text = gRow.Cells[5].Text.Trim() == "0" ? "Payslip" : "Daily Payment";
                gRow.Cells[6].Text = Common.FindInDdlTextData(ddlCalRules, gRow.Cells[6].Text.Trim());
                if (Common.CheckNullString(gRow.Cells[4].Text) != "")
                {
                    gRow.Cells[4].Text = gRow.Cells[4].Text.Trim() == "B" ? "Basic" : "Gross Salary";
                }
            }
            this.EntryMode(true);
            TabContainer1.ActiveTabIndex = 0;
            break;
        }
    }