Click here to Skip to main content
14,695,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In model pop-up I have two 4 colomns in the grid and along with that i have edit linkbutton and delete linkbutton in the grid and also related text boxes. when i click edit i need to fill the textboxs under the grid. i am enabling the edit link button and delete link button. but when i click edit linkbutton second time the pop-up background is becoming black. please help me.
private void DisableGridViewChildControls(bool enable)
        {
            if (FinancialContactGridView.Rows.Count > 0)
            {
                foreach (GridViewRow gvrw in FinancialContactGridView.Rows)
                {
                    LinkButton lnkEdit = (LinkButton)gvrw.FindControl("edit");
                    if (lnkEdit != null)
                        lnkEdit.Enabled = enable;
                    LinkButton lnkDelete = (LinkButton)gvrw.FindControl("CancelLinkButton");
                    if (lnkDelete != null)
                    {
                        if (enable)
                            lnkDelete.Attributes.Add("OnClientClick", "return confirm('Are you sure you want to terminate the contact?');");
                        else
                        {
                            lnkDelete.Attributes.Remove("OnClientClick");
                            lnkDelete.OnClientClick = null;
                        }
                        lnkDelete.Enabled = enable;
                    }
Posted
Updated 2-Apr-13 7:56am
v3
Comments
Maciej Los 2-Apr-13 13:34pm
   
WinForms? WebControls? WPF?

1 solution

LinkButton1.Enabled = false; should disable the link button.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900