数据源缓存打开时如何对数据绑定控件进行排序
当启用 SqlDataSource 缓存并且服务器从缓存加载数据时,SqlDataSource.Selected 事件不会触发。
我正在使用选定的方法和 SqlDataSourceSelectingEventArgs 对数据进行排序,但有时它不会触发。
有人对数据来自缓存时的替代排序方式有任何想法吗?
Protected Sub sdsSupplies_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles sdsSupplies.Selecting
e.Arguments.SortExpression = "SortedColumnID ASC"
End Sub
The SqlDataSource.Selected event does not fire when SqlDataSource caching is enabled and the server loads data from cache.
I was using the selected method and SqlDataSourceSelectingEventArgs to sort my data, but it doesnt fire sometimes.
Anyone have any ideas on an alternate way to sort when data comes from cache?
Protected Sub sdsSupplies_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles sdsSupplies.Selecting
e.Arguments.SortExpression = "SortedColumnID ASC"
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果拦截 DataBinding 事件会发生什么?
What happens if you intercept the DataBinding event?