ASP.NET 2.0 GridView 自定义分页的问题
我有一个包含产品信息的数据库表,如下所示: 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我在谷歌搜索后自己做了这个:
我使用以下 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.