ASP.NET 2.0 GridView 自定义分页的问题

发布于 2024-07-15 11:13:53 字数 260 浏览 3 评论 0原文

我有一个包含产品信息的数据库表,如下所示: ProductID、KeywordID、ProductDescription

以及一些关键字存储在关键字表中: 关键字 ID、关键字描述

我必须在包含网格视图和组合框的页面上显示产品的分页报告 - 在组合框中选择关键字,并且网格视图显示关键字的分页信息。 显然我这里不能使用rowid的方式来实现分页,因为不同关键字相关的所有产品都在同一个表中。

有人可以提出一个好的解决方案吗? 谢谢

I have a Database table containing product information as follows:
ProductID, KeywordID, ProductDescription

and there are some keywords stored in a Keyword table as
Keyword ID, KeywordDescription

I have to show a paged report for products on a page containing the gridview and a combo box - The Keyword is selected in a combo box and the Gridview shows paged information for the Keyword. Obviously I cannot use the rowid approach to implement paging here because all the products related to different keywords are in the same table.

Can someone suggest a good solution.
Thanks

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

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

发布评论

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

评论(1

神魇的王 2024-07-22 11:13:53

好吧,我在谷歌搜索后自己做了这个:
我使用以下 SQL 部分创建了一个合成 RowID,它是一个连续的数字:

“ROW_NUMBER() OVER (ORDER BY ) AS ResultSetRowNumber”

说实话,我忘记了帮助我实现这一目标的帖子。 我一找到链接就会立即发布。

Well I did this one myself after googling for it:
I created a synthetic RowID which is a continuous number using following SQL portion:

"ROW_NUMBER() OVER (ORDER BY ) AS ResultSetRowNumber"

To be honest, I lost track of the post which helped me achieve this. I will post the link soon as I find it.

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