渲染时替换 gridview 行

发布于 2024-07-15 13:57:47 字数 175 浏览 7 评论 0原文

我有一个绑定到 gridview 的数据表,并在 RowDataBound 事件中检查字段的值以确定在 gridview 行中显示的内容。

但是,在某些情况下,当无法计算行中的数据值时,我想显示仅具有跨所有列的单个标签的行。

当 gridview 绑定删除/添加控件时,有没有办法覆盖单行的渲染?

I've got a datatable bound to a gridview and in the RowDataBound event I check the values of the fields to determine what to show in the gridview row.

However, in some cases I want to show a row with just a single label that spans all columns, when the data values in the row can't be calculated.

Is there a way to override the rendering of a single row when a gridview is bound to remove/add controls?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仅此而已 2024-07-22 13:57:47

是的,RowCreated事件。

Yes, the RowCreated event.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文