选择嵌套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