Click here to Skip to main content
12,501,692 members (62,202 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
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 2-Apr-13 6:24am
Updated 2-Apr-13 6:56am
v3
Comments
Maciej Los 2-Apr-13 13:34pm
   
WinForms? WebControls? WPF?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100