本文介绍了禁用编辑链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





在模型弹出窗口中我在网格中有两个4个colomns,还有我在网格中编辑链接按钮和删除链接按钮相关文本框。当我点击编辑时,我需要填写网格下的文本框。我正在启用编辑链接按钮并删除链接按钮。但是当我第二次点击编辑链接按钮时,弹出背景变黑。请帮助我。

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;
                    }

推荐答案


这篇关于禁用编辑链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 13:08