不想在数据表中添加列名
我正在做这样的事情 dt.Columns.Add("SomeCoumnName"); 但我不想在将其绑定到 gridview 后显示该列名称。 只是想显示特定列的空白标题。
I am doing something like this
dt.Columns.Add("SomeCoumnName");
But I don't want to display this column name after binding it to the gridview.
Just want to show a blank header for particular column.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Gridview 中设置 AutoGenerateColumns="false" 并创建自定义标题,如给定示例中所示。如果您不想显示特定列的标题,请在中设置 HeaderText=""
Set AutoGenerateColumns="false" in Gridview and create custom header like in given sample. If you don't want to show header for a particular column then set HeaderText="" in <asp:BoundField ...>