页脚模板字段的可见设置为false [英] Footer Template filed's visible is set to false

查看:50
本文介绍了页脚模板字段的可见设置为false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Gridview页脚中,我具有DropDown列表以及TextBox和LinkBut​​ton.在我的下拉菜单中,我有一些字段

因为该字段之一是"-N/A-",该字段的值是"7".

现在,我的疑问是,当我选择DropDown值"-N/A-"时,会将诸如TextBox和LinkBut​​ton可见性之类的其余字段设置为false.

In my Gridview Footer i have DropDown list and TextBox and LinkButton . In my dropDown I have some fields

in that one of the field is "-N/A-" value of that field is "7".

Now my doubt is when i select the DropDown Value " -N/A-" then the remaining fields like TextBox and LinkButton visiblity to set as false .

protected void GV_RowCommand(object sender, GridViewCommandEventArgs e) 
    { 
       if (e.CommandName == "Add") 
        { 
            GridView grid = (GridView)sender; 
            DataGridItem item = grid.NamingContainer as DataGridItem; 
             
            int Doc_No = Convert.ToInt32(gdDrawing.DataKeys[item.ItemIndex]); 
            ViewState["Doc_Id"] = Doc_No; 
            string Material = (grid.FooterRow.FindControl("ddlMaterial_Type") as DropDownList).SelectedItem.Text; 
            int Material_Id = Convert.ToInt32((grid.FooterRow.FindControl("ddlMaterial_Type") as DropDownList).SelectedValue); 
            string Quantity = (grid.FooterRow.FindControl("txtMaterialQty") as TextBox).Text; 
 
 
           //material_id = 7 then textbox and linkbutton of footer to set visible as false 
} 
}



任何人都可以帮助我解决此问题吗?



can any one help me to solve this issue

推荐答案

当您要在选择下拉列表值或单击页脚链接按钮后隐藏页脚时?
when u want to hide footer after selecting dropdown value or after clicking footer link button ?


这篇关于页脚模板字段的可见设置为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆