Click here to Skip to main content
11,581,210 members (59,419 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#

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?');");
                            lnkDelete.OnClientClick = null;
                        lnkDelete.Enabled = enable;
Posted 2-Apr-13 6:24am
Edited 2-Apr-13 6:56am
Maciej Los at 2-Apr-13 13:34pm
WinForms? WebControls? WPF?

1 solution

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

Solution 1

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)

  Print Answers RSS
0 OriginalGriff 260
1 Frankie-C 145
2 Sergey Alexandrovich Kryukov 135
3 virusstorm 85
4 RyanDev 84
0 OriginalGriff 1,183
1 Sergey Alexandrovich Kryukov 825
2 Abhinav S 597
3 F-ES Sitecore 500
4 Suvendu Shekhar Giri 433

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2015
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