查找itemtemplate的字段 [英] finding itemtemplate's field

查看:58
本文介绍了查找itemtemplate的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有gridview,我有模板字段.
itemtemplate中有标签,我已将其绑定到字段"Party_Name"
现在我要获取此字段名称"Party_Name".
我不希望"Party_Name"的值.
我只想要绑定到标签的字段名称"Party_Name".

i have gridview and i have template field.
there is label in itemtemplate and i have bind it to the field "Party_Name"
now i want to get this field name "Party_Name".
i don''t want the value of "Party_Name".
i just want the field name "Party_Name" which i bound to label.
kindly help me.

推荐答案

请访问此链接,它可能会对您有所帮助.

http://www.aspnet-answers.com/microsoft/Visual-Studio--NET/31665113/cant-find-datafield-as-可读-property-on-any-gridview-child.aspx [ ^ ]


谢谢!!!
Please go through this link, it might help you.

http://www.aspnet-answers.com/microsoft/Visual-Studio--NET/31665113/cant-find-datafield-as-readable-property-on-any-gridview-child.aspx[^]


Thanks!!




您可以使用它.

((Label)lvwRnb.FindControl("lbl_ItemTemplate")).Text ="Party_Name";

希望这一点对您有所帮助.

谢谢.
Hi,

You can use this.

((Label)lvwRnb.FindControl("lbl_ItemTemplate")).Text = "Party_Name";

I hope this one can help.

Thank You.


这篇关于查找itemtemplate的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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