惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
Y
Y Combinator Blog
D
DataBreaches.Net
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
H
Help Net Security
GbyAI
GbyAI
C
Check Point Blog
L
LangChain Blog
小众软件
小众软件
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
G
Google Developers Blog
月光博客
月光博客
V
V2EX
M
MIT News - Artificial intelligence
博客园 - 叶小钗

博客园 - myer

使用you-get下载youtube视频 找不到org.springframework.context.ConfigurableApplicationContext的类文件 Centos7安装mysql8 无法加载oramts.dll 反射应用中的同种类型转换错误 - myer - 博客园 aspx文件生产静态html文件 在ASP.NET中实现Url Rewriting 正则表达式 c# 手机号码正则表达式 - myer - 博客园 jscalendar-1.0中文解决方法 asp.net 小偷程序实现的原理和源码 - myer - 博客园 GridView 排序 开源软件FtpClient几个问题 CMM简介 C# ping命令的实现 DIV模式窗口的实现 .net中序列化和反序列化 ASP.net 本地化和国际化 C#编码规范
GridView中嵌套GridView
myer · 2007-03-30 · via 博客园 - myer

//aspx页面
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" GridLines="None"
                                    ShowHeader="False" OnRowDataBound="GridView2_RowDataBound">
               <Columns>
                     <asp:TemplateField>
                             <ItemTemplate>
                                 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true">
                                 </asp:GridView>
                              </ItemTemplate>
                      </asp:TemplateField>
              </Columns>
  </asp:GridView>
//aspx.cs页面
protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            GridView Grd = e.Row.Cells[0].FindControl("GridView1") as GridView;
            Grd.DataSource = 数据集;
            Grd.DataBind();
        }      
    }

posted on 2007-03-30 16:08  myer  阅读(2802)  评论()    收藏  举报