捕获数据网格滚动的事件
我有两个问题: 1. 捕获数据网格中发生滚动这一事实的事件是什么? 2. 当用户单击单元格然后拖出 datagid 时,是否有人对如何禁用 datagrid 的滚动有任何建议?
谢谢
I have 2 questions:
1. What would be the event to capture the fact a scroll has taken place in a datagrid?
2. Does anyone have any suggestions on how one could disable the scroll of the datagrid when a user clicks a cell then drags out of the datagid?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不太熟悉
DataGrid
,但是 这是DataGrid
的类文档我正在看。查看
horizontalScrollPolicy
函数可能会有帮助。不管怎样,它看起来不像有滚动事件,所以我要做的是捕获滚动条上的
Event.CHANGE
事件并查看目标的属性了解有关滚动位置的更多信息。例如,此外,要终止事件,您可以在该事件上
stopPropagation
。例如,不幸的是,此信息只是您答案的一部分,但至少第二个提示将在以后多次提供帮助。希望我知道更多可以提供帮助。 祝你好运!
I'm not too familiar with the
DataGrid
, but here's the Class doc for theDataGrid
which I was looking at.It may be helpful to look at the
horizontalScrollPolicy
function.Anyway, it doesn't look like there is a scroll event, so what I would do is capture an
Event.CHANGE
event on your scrollbar and look at the target's properties to find out more about the scroll position. egAlso, to kill an event you can
stopPropagation
on the event. egUnfortunately, this info is only part of your answer, but at least that second tip will help a number of times down the road. Wish I knew more to help. Good luck!