gpt4 book ai didi

c# - 如何从后面的代码中获取 gridview c# 中的只读文本框值

转载 作者:太空宇宙 更新时间:2023-11-03 12:45:04 25 4
gpt4 key购买 nike

我有一个网格,我需要从后面的代码中获取 gridview c# 中的只读文本框值

最佳答案

protected void grd1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (txt.Text != "")
{
txt.Attributes.Add("readonly", "readonly");
txt.Visible = false;
lbltaskname.Visible = true;
}
else
{
txt.Attributes.Remove("readonly");
}
}
}

关于c# - 如何从后面的代码中获取 gridview c# 中的只读文本框值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37627263/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com