请问:GridView和一个空表绑定时可否在GridView中显示几条空记录呢? 这样的话你的表的大概行数知道 可以预设几个label 给他们附上初值 然后设置为隐藏 Visable="false"就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField HeaderText="电子邮件"> <itemtemplate> <asp:Label id="LbLoginName" runat="server" Text='<%# Page.User.Identity.Name %>' Visable="false"></asp:Label> </itemtemplate> </asp:TemplateField> <asp:TemplateField HeaderText="电子邮件"> <itemtemplate> ..... </itemtemplate> </asp:TemplateField> </Columns></asp:GridView> 楼上的办法应该可以的,可以可以新建一个DataTable,表中的每个记录都是空的,然后绑定到GridView上 你查询出所有数据赋给table,然后给table 加个栏位 如【index】,作为key值。在绑定GrieView,gridview 属性DataKeyNames 里就写【index】,就可以显示出空白行了。 C# 怎样开发数据库离线应用?当可以连接服务端DB时,将本地DB同步到服务端DB? 根据字符选择所在的行或列 求个c/s模式下做电子地图的例子 求助,窗口最大化,上边空一块! C#winform程序调用delphi问题 setup project怎么样在开始->程序里面创建快捷方式? 关于Community Server 与现有网站整合的问题 关于static 如何使用WatiN 来实现控制<input type=file/>这个元素 WPF,绑定到null值的情况 传值 请问,用C#做打印图形的程序时,如何理解在打印平面和在窗体上的分辩率之间的关系
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField HeaderText="电子邮件">
<itemtemplate>
<asp:Label id="LbLoginName" runat="server" Text='<%# Page.User.Identity.Name %>' Visable="false"></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="电子邮件">
<itemtemplate>
.....
</itemtemplate>
</asp:TemplateField> </Columns>
</asp:GridView>