选择嵌套gridview中的行 [英] Selecting rows in nested gridview
本文介绍了选择嵌套gridview中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为gvMaster的gridview和一个名为nestedGridView的嵌套gridview。我已将复选框添加到nestedGridView行。现在,我如何通过选择nestedGridView的标题行来检查所有行。
ThankYou
Hi,
I have a gridview named as gvMaster and a nested gridview named as nestedGridView. I have added check boxes to rows of nestedGridView. Now, how can I check all the rows by selecting header row of nestedGridView.
ThankYou
推荐答案
如果你动态地将嵌套的GridView添加到gvMaster中。
您可以像这样访问它:
If you added the nestedGridView into gvMaster dynamically.
You access the it like this:
GridView gv = ((GridView)gvMaster.Rows[0].Cells[0].Controls[0]);
如果您在ItemTemplate中添加了带有标签的ASP.NET页面,则可以像这样访问它:
If you added the in ASP.NET page with tags in ItemTemplate, you access it like this:
GridView gv = ((GridView)gvMaster.Rows[0].Cells[0].FindControl("nestedGridView"));
没有我funciono me puedes ayudar
no me funciono me puedes ayudar
这篇关于选择嵌套gridview中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文